mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
Merge #59422: patchutils: 0.3.3 -> 0.3.4, keep 0.3.3 for fetchpatch
This commit is contained in:
commit
0fb181b8ce
@ -5,6 +5,10 @@
|
||||
# stripLen acts as the -p parameter when applying a patch.
|
||||
|
||||
{ lib, fetchurl, buildPackages }:
|
||||
let
|
||||
# 0.3.4 would change hashes: https://github.com/NixOS/nixpkgs/issues/25154
|
||||
patchutils = buildPackages.patchutils_0_3_3;
|
||||
in
|
||||
{ stripLen ? 0, extraPrefix ? null, excludes ? [], includes ? [], revert ? false, ... }@args:
|
||||
|
||||
fetchurl ({
|
||||
@ -14,10 +18,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 +36,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 +50,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 != [];
|
||||
|
7
pkgs/tools/text/patchutils/0.3.3.nix
Normal file
7
pkgs/tools/text/patchutils/0.3.3.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{ callPackage, ... } @ args:
|
||||
|
||||
callPackage ./generic.nix (args // rec {
|
||||
version = "0.3.3";
|
||||
sha256 = "0g5df00cj4nczrmr4k791l7la0sq2wnf8rn981fsrz1f3d2yix4i";
|
||||
patches = [ ./drop-comments.patch ]; # we would get into a cycle when using fetchpatch on this one
|
||||
})
|
@ -1,26 +1,6 @@
|
||||
{ stdenv, fetchurl }:
|
||||
{ callPackage, ... } @ args:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "patchutils-0.3.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://cyberelk.net/tim/data/patchutils/stable/${name}.tar.xz";
|
||||
sha256 = "0g5df00cj4nczrmr4k791l7la0sq2wnf8rn981fsrz1f3d2yix4i";
|
||||
};
|
||||
|
||||
patches = [ ./drop-comments.patch ]; # we would get into a cycle when using fetchpatch on this one
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
doCheck = false; # fails
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Tools to manipulate patch files";
|
||||
homepage = http://cyberelk.net/tim/software/patchutils;
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.all;
|
||||
executables = [ "combinediff" "dehtmldiff" "editdiff" "espdiff"
|
||||
"filterdiff" "fixcvsdiff" "flipdiff" "grepdiff" "interdiff" "lsdiff"
|
||||
"recountdiff" "rediff" "splitdiff" "unwrapdiff" ];
|
||||
};
|
||||
}
|
||||
callPackage ./generic.nix (args // rec {
|
||||
version = "0.3.4";
|
||||
sha256 = "0xp8mcfyi5nmb5a2zi5ibmyshxkb1zv1dgmnyn413m7ahgdx8mfg";
|
||||
})
|
||||
|
27
pkgs/tools/text/patchutils/generic.nix
Normal file
27
pkgs/tools/text/patchutils/generic.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ stdenv, fetchurl
|
||||
, version, sha256, patches ? []
|
||||
, ...
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "patchutils";
|
||||
inherit version patches;
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://cyberelk.net/tim/data/patchutils/stable/${pname}-${version}.tar.xz";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
doCheck = false; # fails
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Tools to manipulate patch files";
|
||||
homepage = http://cyberelk.net/tim/software/patchutils;
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.all;
|
||||
executables = [ "combinediff" "dehtmldiff" "editdiff" "espdiff"
|
||||
"filterdiff" "fixcvsdiff" "flipdiff" "grepdiff" "interdiff" "lsdiff"
|
||||
"recountdiff" "rediff" "splitdiff" "unwrapdiff" ];
|
||||
};
|
||||
}
|
@ -5030,6 +5030,8 @@ in
|
||||
|
||||
patchutils = callPackage ../tools/text/patchutils { };
|
||||
|
||||
patchutils_0_3_3 = callPackage ../tools/text/patchutils/0.3.3.nix { };
|
||||
|
||||
parted = callPackage ../tools/misc/parted { };
|
||||
|
||||
paulstretch = callPackage ../applications/audio/paulstretch { };
|
||||
|
Loading…
Reference in New Issue
Block a user