1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-23 07:10:39 -04:00
nixpkgs/pkgs/build-support/fetchgit/default.nix
Lluís Batlle i Rossell 896dc42662 Forgot some 'depth' regarding fetchgit still.
svn path=/nixpkgs/trunk/; revision=18279
2009-11-08 01:59:50 +00:00

24 lines
652 B
Nix

{stdenv, git}:
{url, rev ? "HEAD", md5 ? "", sha256 ? ""}:
stdenv.mkDerivation {
name = "git-export";
builder = ./builder.sh;
buildInputs = [git];
outputHashAlgo = if sha256 == "" then "md5" else "sha256";
outputHashMode = "recursive";
outputHash = if sha256 == "" then md5 else sha256;
inherit url rev;
impureEnvVars = [
# We borrow these environment variables from the caller to allow
# easy proxy configuration. This is impure, but a fixed-output
# derivation like fetchurl is allowed to do so since its result is
# by definition pure.
"http_proxy" "https_proxy" "ftp_proxy" "all_proxy" "no_proxy"
];
}