summary refs log tree commit diff
path: root/pkgs/build-support/fetchpatch
diff options
context:
space:
mode:
authorBob van der Linden <bobvanderlinden@gmail.com>2019-04-13 23:12:55 +0200
committerBob van der Linden <bobvanderlinden@gmail.com>2019-04-13 23:20:33 +0200
commit9555fd73f323deb21d25a4a045ba67ad2f87d2c6 (patch)
tree6800f842c4a06c7d3231c4733cb7343604ed4891 /pkgs/build-support/fetchpatch
parent81e9ddfd7217583b7af3335d7aa098309a946cce (diff)
downloadnixpkgs-9555fd73f323deb21d25a4a045ba67ad2f87d2c6.tar
nixpkgs-9555fd73f323deb21d25a4a045ba67ad2f87d2c6.tar.gz
nixpkgs-9555fd73f323deb21d25a4a045ba67ad2f87d2c6.tar.bz2
nixpkgs-9555fd73f323deb21d25a4a045ba67ad2f87d2c6.tar.lz
nixpkgs-9555fd73f323deb21d25a4a045ba67ad2f87d2c6.tar.xz
nixpkgs-9555fd73f323deb21d25a4a045ba67ad2f87d2c6.tar.zst
nixpkgs-9555fd73f323deb21d25a4a045ba67ad2f87d2c6.zip
fetchpatch: explicitly use patchutils 0.3.3
Diffstat (limited to 'pkgs/build-support/fetchpatch')
-rw-r--r--pkgs/build-support/fetchpatch/default.nix11
1 files changed, 7 insertions, 4 deletions
diff --git a/pkgs/build-support/fetchpatch/default.nix b/pkgs/build-support/fetchpatch/default.nix
index 89d72f512f7..b5bbed28450 100644
--- a/pkgs/build-support/fetchpatch/default.nix
+++ b/pkgs/build-support/fetchpatch/default.nix
@@ -5,6 +5,9 @@
 # stripLen acts as the -p parameter when applying a patch.
 
 { lib, fetchurl, buildPackages }:
+let
+  patchutils = buildPackages.patchutils_0_3_3;
+in
 { stripLen ? 0, extraPrefix ? null, excludes ? [], includes ? [], revert ? false, ... }@args:
 
 fetchurl ({
@@ -14,10 +17,10 @@ fetchurl ({
       echo "error: Fetched patch file '$out' is empty!" 1>&2
       exit 1
     fi
-    "${buildPackages.patchutils}/bin/lsdiff" "$out" \
+    "${patchutils}/bin/lsdiff" "$out" \
       | sort -u | sed -e 's/[*?]/\\&/g' \
       | xargs -I{} \
-        "${buildPackages.patchutils}/bin/filterdiff" \
+        "${patchutils}/bin/filterdiff" \
         --include={} \
         --strip=${toString stripLen} \
         ${lib.optionalString (extraPrefix != null) ''
@@ -32,7 +35,7 @@ fetchurl ({
       cat "$out" 1>&2
       exit 1
     fi
-    ${buildPackages.patchutils}/bin/filterdiff \
+    ${patchutils}/bin/filterdiff \
       -p1 \
       ${builtins.toString (builtins.map (x: "-x ${lib.escapeShellArg x}") excludes)} \
       ${builtins.toString (builtins.map (x: "-i ${lib.escapeShellArg x}") includes)} \
@@ -46,7 +49,7 @@ fetchurl ({
       exit 1
     fi
   '' + lib.optionalString revert ''
-    ${buildPackages.patchutils}/bin/interdiff "$out" /dev/null > "$tmpfile"
+    ${patchutils}/bin/interdiff "$out" /dev/null > "$tmpfile"
     mv "$tmpfile" "$out"
   '' + (args.postFetch or "");
   meta.broken = excludes != [] && includes != [];