summary refs log tree commit diff
path: root/pkgs/build-support/fetchpatch
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2015-06-19 18:50:08 +0200
committeraszlig <aszlig@redmoonstudios.org>2015-06-23 03:35:30 +0200
commitd2df553da17e38eb73fde1ebcb1664ebe80ddd62 (patch)
treec66514e8e8187121a9c4e261d3d8113a8273f39d /pkgs/build-support/fetchpatch
parent5cd1fd8012f045177fe030a0e3b1313bec44973d (diff)
downloadnixpkgs-d2df553da17e38eb73fde1ebcb1664ebe80ddd62.tar
nixpkgs-d2df553da17e38eb73fde1ebcb1664ebe80ddd62.tar.gz
nixpkgs-d2df553da17e38eb73fde1ebcb1664ebe80ddd62.tar.bz2
nixpkgs-d2df553da17e38eb73fde1ebcb1664ebe80ddd62.tar.lz
nixpkgs-d2df553da17e38eb73fde1ebcb1664ebe80ddd62.tar.xz
nixpkgs-d2df553da17e38eb73fde1ebcb1664ebe80ddd62.tar.zst
nixpkgs-d2df553da17e38eb73fde1ebcb1664ebe80ddd62.zip
fetchpatch: Allow to pass a postFetch attribute.
Comes in handy if we want to make additional modificiations to the
output file. While I wasn't sure whether to invoke the passed postFetch
directly before the patch or afterwards, I thought it would be better
afterwards because "postFetch of fetchpatch" at least to my intuition
would sound that after whatever "fetchpatch" does - it comes afterwards.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/build-support/fetchpatch')
-rw-r--r--pkgs/build-support/fetchpatch/default.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkgs/build-support/fetchpatch/default.nix b/pkgs/build-support/fetchpatch/default.nix
index 29ff5c31e45..60785f42b54 100644
--- a/pkgs/build-support/fetchpatch/default.nix
+++ b/pkgs/build-support/fetchpatch/default.nix
@@ -18,5 +18,6 @@ fetchurl ({
         --strip=${toString stripLen} \
         --clean "$out" > "$tmpfile"
     mv "$tmpfile" "$out"
+    ${args.postFetch or ""}
   '';
 } // builtins.removeAttrs args ["stripLen"])