3
0
Fork 0
forked from mirrors/nixpkgs

fetchgit: add postFetch argument

This commit is contained in:
Daiderd Jordan 2017-06-03 20:45:51 +02:00
parent 8b8a83ff79
commit 7567c5c1ee
No known key found for this signature in database
GPG key ID: D02435D05B810C96
2 changed files with 5 additions and 1 deletions

View file

@ -12,4 +12,5 @@ $SHELL $fetcher --builder --url "$url" --out "$out" --rev "$rev" \
${fetchSubmodules:+--fetch-submodules} \
${branchName:+--branch-name "$branchName"}
runHook postFetch
stopNest

View file

@ -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";