diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-10-25 12:01:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 12:01:31 +0000 |
commit | 0336295c415fe1f3df00f42a68242e2b023ef902 (patch) | |
tree | 879635bd57b2c1e8d586f3c2cf7ef165cbe674b7 /pkgs/tools/text | |
parent | 20ecf5770423a03d979f5e07eeae34d0a6745f50 (diff) | |
parent | 44f2fc42d39f3bb8c8e01fe96eb7b85bf5a9a9aa (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/tools/text')
-rw-r--r-- | pkgs/tools/text/patchutils/0.4.2.nix | 8 | ||||
-rw-r--r-- | pkgs/tools/text/patchutils/generic.nix | 28 |
2 files changed, 29 insertions, 7 deletions
diff --git a/pkgs/tools/text/patchutils/0.4.2.nix b/pkgs/tools/text/patchutils/0.4.2.nix new file mode 100644 index 0000000000000..1b2c0d6b1f3ec --- /dev/null +++ b/pkgs/tools/text/patchutils/0.4.2.nix @@ -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 ]; +}) diff --git a/pkgs/tools/text/patchutils/generic.nix b/pkgs/tools/text/patchutils/generic.nix index d3e9da242e2e9..923dd06d18268 100644 --- a/pkgs/tools/text/patchutils/generic.nix +++ b/pkgs/tools/text/patchutils/generic.nix @@ -1,5 +1,5 @@ -{ lib, stdenv, fetchurl, perl -, version, sha256, patches ? [] +{ lib, stdenv, fetchurl, perl, makeWrapper +, version, sha256, patches ? [], extraBuildInputs ? [] , ... }: stdenv.mkDerivation rec { @@ -11,18 +11,32 @@ stdenv.mkDerivation rec { inherit sha256; }; - buildInputs = [ perl ]; + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ perl ] ++ extraBuildInputs; 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; { 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" ]; + maintainers = with maintainers; [ artturin ]; }; } |