gitRepo: Cleanup the patchPhase
This variant should be easier to read (it was pretty messy before...). The end result stays the same.
This commit is contained in:
parent
74b7aae3af
commit
cc5f7d9091
|
@ -16,10 +16,10 @@ stdenv.mkDerivation rec {
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
buildInputs = [ python ];
|
buildInputs = [ python ];
|
||||||
|
|
||||||
# TODO: Cleanup
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
CA_PATH="$(echo '${cacert}/etc/ssl/certs/ca-bundle.crt' | sed 's/\//\\\//g')" # / -> \/
|
substituteInPlace repo --replace \
|
||||||
sed -i -E 's/urlopen\(url\)/urlopen(url, cafile="'$CA_PATH'")/' repo
|
'urllib.request.urlopen(url)' \
|
||||||
|
'urllib.request.urlopen(url, cafile="${cacert}/etc/ssl/certs/ca-bundle.crt")'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
|
Loading…
Reference in a new issue