From 2b5ef661116a5e51dbcb06706360fe1e4365c5fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 18 Nov 2009 16:42:35 +0000 Subject: [PATCH] Ask `nix-prefetch-git' to leave `.git' in the output. --- src/lib/Hydra/Helper/AddBuilds.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/Hydra/Helper/AddBuilds.pm b/src/lib/Hydra/Helper/AddBuilds.pm index 99013ac8..9df15dd1 100644 --- a/src/lib/Hydra/Helper/AddBuilds.pm +++ b/src/lib/Hydra/Helper/AddBuilds.pm @@ -238,7 +238,12 @@ sub fetchInputGit { print STDERR "checking out Git input from $uri"; $ENV{"NIX_HASH_ALGO"} = "sha256"; $ENV{"PRINT_PATH"} = "1"; - $ENV{"NIX_PREFETCH_GIT_CHECKOUT_HOOK"} = "git describe > .git-version"; + + # Checked out code often wants to be able to run `git + # describe', e.g., code that uses Gnulib's `git-version-gen' + # script. Thus, we leave `.git' in there. + $ENV{"NIX_PREFETCH_GIT_LEAVE_DOT_GIT"} = "1"; + my $stdout; my $stderr; (my $res, $stdout, $stderr) = captureStdoutStderr( "nix-prefetch-git", $uri);