diff options
author | volth <volth@volth.com> | 2018-08-21 20:58:56 +0000 |
---|---|---|
committer | John Ericson <mail@JohnEricson.me> | 2018-08-21 17:21:25 -0400 |
commit | caf2cae44bc2717f2b94ae589c495f0c8d911908 (patch) | |
tree | e7b1566756dc131a0c36a70fb45166e6cc6f886f /pkgs/build-support/fetchpatch/default.nix | |
parent | 60970294550aa78517ae8b19b4f99c0ccf170f4a (diff) |
fetchpatch: patchutils -> buildPackages.patchutils
Diffstat (limited to 'pkgs/build-support/fetchpatch/default.nix')
-rw-r--r-- | pkgs/build-support/fetchpatch/default.nix | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/build-support/fetchpatch/default.nix b/pkgs/build-support/fetchpatch/default.nix index 40a7675b7ac58..89d72f512f7f9 100644 --- a/pkgs/build-support/fetchpatch/default.nix +++ b/pkgs/build-support/fetchpatch/default.nix @@ -4,7 +4,7 @@ # often change with updating of git or cgit. # stripLen acts as the -p parameter when applying a patch. -{ lib, fetchurl, patchutils }: +{ lib, fetchurl, buildPackages }: { stripLen ? 0, extraPrefix ? null, excludes ? [], includes ? [], revert ? false, ... }@args: fetchurl ({ @@ -14,10 +14,10 @@ fetchurl ({ echo "error: Fetched patch file '$out' is empty!" 1>&2 exit 1 fi - "${patchutils}/bin/lsdiff" "$out" \ + "${buildPackages.patchutils}/bin/lsdiff" "$out" \ | sort -u | sed -e 's/[*?]/\\&/g' \ | xargs -I{} \ - "${patchutils}/bin/filterdiff" \ + "${buildPackages.patchutils}/bin/filterdiff" \ --include={} \ --strip=${toString stripLen} \ ${lib.optionalString (extraPrefix != null) '' @@ -32,7 +32,7 @@ fetchurl ({ cat "$out" 1>&2 exit 1 fi - ${patchutils}/bin/filterdiff \ + ${buildPackages.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 +46,7 @@ fetchurl ({ exit 1 fi '' + lib.optionalString revert '' - ${patchutils}/bin/interdiff "$out" /dev/null > "$tmpfile" + ${buildPackages.patchutils}/bin/interdiff "$out" /dev/null > "$tmpfile" mv "$tmpfile" "$out" '' + (args.postFetch or ""); meta.broken = excludes != [] && includes != []; |