diff options
Diffstat (limited to 'pkgs/build-support/fetchgit')
-rw-r--r-- | pkgs/build-support/fetchgit/builder.sh | 2 | ||||
-rw-r--r-- | pkgs/build-support/fetchgit/default.nix | 2 | ||||
-rwxr-xr-x | pkgs/build-support/fetchgit/nix-prefetch-git | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/build-support/fetchgit/builder.sh b/pkgs/build-support/fetchgit/builder.sh index 64eea4ae1000..4bbef1d6e62a 100644 --- a/pkgs/build-support/fetchgit/builder.sh +++ b/pkgs/build-support/fetchgit/builder.sh @@ -6,7 +6,7 @@ source $stdenv/setup header "exporting $url (rev $rev) into $out" -$fetcher --builder --url "$url" --out "$out" --rev "$rev" \ +$SHELL $fetcher --builder --url "$url" --out "$out" --rev "$rev" \ ${leaveDotGit:+--leave-dotGit} \ ${deepClone:+--deepClone} \ ${fetchSubmodules:+--fetch-submodules} \ diff --git a/pkgs/build-support/fetchgit/default.nix b/pkgs/build-support/fetchgit/default.nix index 8ddb6a85d0c2..127693d42f2a 100644 --- a/pkgs/build-support/fetchgit/default.nix +++ b/pkgs/build-support/fetchgit/default.nix @@ -45,7 +45,7 @@ assert deepClone -> leaveDotGit; stdenv.mkDerivation { inherit name; builder = ./builder.sh; - fetcher = ./nix-prefetch-git; + fetcher = "${./nix-prefetch-git}"; # This must be a string to ensure it's called with bash. buildInputs = [git]; outputHashAlgo = if sha256 == "" then "md5" else "sha256"; diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index 736cf0194163..6cf694dd2b14 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -1,4 +1,6 @@ -#! /bin/sh -e +#! /usr/bin/env bash + +set -e -o pipefail url= rev= |