git.iko.soy/typeable/nixpkgs
on master help sign in
fetchgit: add postFetch argument
commit7567c5c1ee4afde01d798c8419b8a7f89ed081d8 authorDaiderd Jordan <daiderd@gmail.com> dateSat 3 Jun 2017, 20:45 (9 years ago) parent8b8a83f
2 files changed+5−1
pkgs/build-support/fetchgit/builder.sh+1 pkgs/build-support/fetchgit/default.nix+4−1
pkgs/build-support/fetchgit/builder.sh+1
@@ -12,4 +12,5 @@ $SHELL $fetcher --builder --url "$url" --out "$out" --rev "$rev" \
1212 ${fetchSubmodules:+--fetch-submodules} \
1313 ${branchName:+--branch-name "$branchName"}
1414
15+runHook postFetch
1516stopNest
pkgs/build-support/fetchgit/default.nix+4−1
@@ -15,6 +15,9 @@ in
1515, fetchSubmodules ? true, deepClone ? false
1616, branchName ? null
1717, name ? urlToName url rev
18+, # Shell code executed after the file has been fetched
19+ # successfully. This can do things like check or transform the file.
20+ postFetch ? ""
1821}:
1922
2023/* NOTE:
@@ -54,7 +57,7 @@ stdenv.mkDerivation {
5457 outputHashMode = "recursive";
5558 outputHash = sha256;
5659
57− inherit url rev leaveDotGit fetchSubmodules deepClone branchName;
60+ inherit url rev leaveDotGit fetchSubmodules deepClone branchName postFetch;
5861
5962 GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt";
6063