diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2017-06-03 20:45:51 +0200 |
---|---|---|
committer | Daiderd Jordan <daiderd@gmail.com> | 2017-06-03 20:51:01 +0200 |
commit | 7567c5c1ee4afde01d798c8419b8a7f89ed081d8 (patch) | |
tree | cac0b2316f85a5c4b749b83e2f92b4754316c75d /pkgs/build-support/fetchgit | |
parent | 8b8a83ff79acf76cd6ebca5b81c5ad198d1e8cf4 (diff) |
fetchgit: add postFetch argument
Diffstat (limited to 'pkgs/build-support/fetchgit')
-rw-r--r-- | pkgs/build-support/fetchgit/builder.sh | 1 | ||||
-rw-r--r-- | pkgs/build-support/fetchgit/default.nix | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchgit/builder.sh b/pkgs/build-support/fetchgit/builder.sh index 4bbef1d6e62ae..6ae46469738a8 100644 --- a/pkgs/build-support/fetchgit/builder.sh +++ b/pkgs/build-support/fetchgit/builder.sh @@ -12,4 +12,5 @@ $SHELL $fetcher --builder --url "$url" --out "$out" --rev "$rev" \ ${fetchSubmodules:+--fetch-submodules} \ ${branchName:+--branch-name "$branchName"} +runHook postFetch stopNest diff --git a/pkgs/build-support/fetchgit/default.nix b/pkgs/build-support/fetchgit/default.nix index d85d2c893c520..a5f81ef17940d 100644 --- a/pkgs/build-support/fetchgit/default.nix +++ b/pkgs/build-support/fetchgit/default.nix @@ -15,6 +15,9 @@ in , fetchSubmodules ? true, deepClone ? false , branchName ? null , name ? urlToName url rev +, # Shell code executed after the file has been fetched + # successfully. This can do things like check or transform the file. + postFetch ? "" }: /* NOTE: @@ -54,7 +57,7 @@ stdenv.mkDerivation { outputHashMode = "recursive"; outputHash = sha256; - inherit url rev leaveDotGit fetchSubmodules deepClone branchName; + inherit url rev leaveDotGit fetchSubmodules deepClone branchName postFetch; GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt"; |