patchutils: add 0.4.2 variant + remove meta.executable + enable tests + fix inter-dependencies by wrapping (#141567)
This commit is contained in:
parent
b0d5803400
commit
44403b728b
8
pkgs/build-support/fetchpatch/tests.nix
Normal file
8
pkgs/build-support/fetchpatch/tests.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{ invalidateFetcherByDrvHash, fetchpatch, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
simple = invalidateFetcherByDrvHash fetchpatch {
|
||||||
|
url = "https://github.com/facebook/zstd/pull/2724/commits/e1f85dbca3a0ed5ef06c8396912a0914db8dea6a.patch";
|
||||||
|
sha256 = "sha256-PuYAqnJWAE+L9bsroOnnBGJhERW8LHrGSLtIEkKU9vg=";
|
||||||
|
};
|
||||||
|
}
|
8
pkgs/tools/text/patchutils/0.4.2.nix
Normal file
8
pkgs/tools/text/patchutils/0.4.2.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{ callPackage, python3, ... } @ args:
|
||||||
|
|
||||||
|
callPackage ./generic.nix (args // {
|
||||||
|
version = "0.4.2";
|
||||||
|
sha256 = "sha256-iHWwll/jPeYriQ9s15O+f6/kGk5VLtv2QfH+1eu/Re0=";
|
||||||
|
# for gitdiff
|
||||||
|
extraBuildInputs = [ python3 ];
|
||||||
|
})
|
@ -1,5 +1,5 @@
|
|||||||
{ lib, stdenv, fetchurl, perl
|
{ lib, stdenv, fetchurl, perl, makeWrapper
|
||||||
, version, sha256, patches ? []
|
, version, sha256, patches ? [], extraBuildInputs ? []
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -11,18 +11,32 @@ stdenv.mkDerivation rec {
|
|||||||
inherit sha256;
|
inherit sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ perl ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
buildInputs = [ perl ] ++ extraBuildInputs;
|
||||||
hardeningDisable = [ "format" ];
|
hardeningDisable = [ "format" ];
|
||||||
|
|
||||||
doCheck = false; # fails
|
postInstall = ''
|
||||||
|
for bin in $out/bin/{splitdiff,rediff,editdiff,dehtmldiff}; do
|
||||||
|
wrapProgram "$bin" \
|
||||||
|
--prefix PATH : "$out/bin"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
|
doCheck = lib.versionAtLeast version "0.3.4";
|
||||||
|
|
||||||
|
preCheck = ''
|
||||||
|
patchShebangs tests
|
||||||
|
chmod +x scripts/*
|
||||||
|
'' + lib.optionalString (lib.versionOlder version "0.4.2") ''
|
||||||
|
find tests -type f -name 'run-test' \
|
||||||
|
-exec sed -i '{}' -e 's|/bin/echo|echo|g' \;
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Tools to manipulate patch files";
|
description = "Tools to manipulate patch files";
|
||||||
homepage = "http://cyberelk.net/tim/software/patchutils";
|
homepage = "http://cyberelk.net/tim/software/patchutils";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
executables = [ "combinediff" "dehtmldiff" "editdiff" "espdiff"
|
maintainers = with maintainers; [ artturin ];
|
||||||
"filterdiff" "fixcvsdiff" "flipdiff" "grepdiff" "interdiff" "lsdiff"
|
|
||||||
"recountdiff" "rediff" "splitdiff" "unwrapdiff" ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -507,7 +507,10 @@ with pkgs;
|
|||||||
|
|
||||||
mht2htm = callPackage ../tools/misc/mht2htm { };
|
mht2htm = callPackage ../tools/misc/mht2htm { };
|
||||||
|
|
||||||
fetchpatch = callPackage ../build-support/fetchpatch { };
|
fetchpatch = callPackage ../build-support/fetchpatch { }
|
||||||
|
// {
|
||||||
|
tests = callPackages ../build-support/fetchpatch/tests.nix { };
|
||||||
|
};
|
||||||
|
|
||||||
fetchs3 = callPackage ../build-support/fetchs3 { };
|
fetchs3 = callPackage ../build-support/fetchs3 { };
|
||||||
|
|
||||||
@ -8296,6 +8299,8 @@ with pkgs;
|
|||||||
|
|
||||||
patchutils_0_3_3 = callPackage ../tools/text/patchutils/0.3.3.nix { };
|
patchutils_0_3_3 = callPackage ../tools/text/patchutils/0.3.3.nix { };
|
||||||
|
|
||||||
|
patchutils_0_4_2 = callPackage ../tools/text/patchutils/0.4.2.nix { };
|
||||||
|
|
||||||
parted = callPackage ../tools/misc/parted { };
|
parted = callPackage ../tools/misc/parted { };
|
||||||
|
|
||||||
passh = callPackage ../tools/networking/passh { };
|
passh = callPackage ../tools/networking/passh { };
|
||||||
|
Loading…
Reference in New Issue
Block a user