From d528cba5b88076f88c7d32c9795811809aa6004e Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Sun, 28 Aug 2011 16:03:14 +0000 Subject: [PATCH] fetchgit: Handle https. svn path=/nixpkgs/trunk/; revision=28857 --- pkgs/build-support/fetchgit/default.nix | 4 +++- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/fetchgit/default.nix b/pkgs/build-support/fetchgit/default.nix index 714740ee1bf..e94e4185936 100644 --- a/pkgs/build-support/fetchgit/default.nix +++ b/pkgs/build-support/fetchgit/default.nix @@ -1,4 +1,4 @@ -{stdenv, git}: +{stdenv, git, cacert}: {url, rev ? "HEAD", md5 ? "", sha256 ? "", leaveDotGit ? false }: /* NOTE: @@ -35,6 +35,8 @@ stdenv.mkDerivation { inherit url rev leaveDotGit; + GIT_SSL_CAINFO = "${cacert}/etc/ca-bundle.crt"; + impureEnvVars = [ # We borrow these environment variables from the caller to allow # easy proxy configuration. This is impure, but a fixed-output diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 374193b131b..c94da50125d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -261,7 +261,7 @@ let }; fetchgit = import ../build-support/fetchgit { - inherit stdenv git; + inherit stdenv git cacert; }; fetchgitrevision = import ../build-support/fetchgitrevision runCommand git;