From cc5f7d9091396fc328b789033b69730366bdd36f Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Sat, 19 Jan 2019 12:23:08 +0100 Subject: [PATCH] gitRepo: Cleanup the patchPhase This variant should be easier to read (it was pretty messy before...). The end result stays the same. --- pkgs/applications/version-management/git-repo/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/version-management/git-repo/default.nix b/pkgs/applications/version-management/git-repo/default.nix index 11fa892f135..b629c8fe910 100644 --- a/pkgs/applications/version-management/git-repo/default.nix +++ b/pkgs/applications/version-management/git-repo/default.nix @@ -16,10 +16,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ]; buildInputs = [ python ]; - # TODO: Cleanup patchPhase = '' - CA_PATH="$(echo '${cacert}/etc/ssl/certs/ca-bundle.crt' | sed 's/\//\\\//g')" # / -> \/ - sed -i -E 's/urlopen\(url\)/urlopen(url, cafile="'$CA_PATH'")/' repo + substituteInPlace repo --replace \ + 'urllib.request.urlopen(url)' \ + 'urllib.request.urlopen(url, cafile="${cacert}/etc/ssl/certs/ca-bundle.crt")' ''; installPhase = ''