patchutils: generalize package

This commit is contained in:
Bob van der Linden 2019-04-13 23:09:44 +02:00
parent 77dcb9e619
commit c8afc263df
No known key found for this signature in database
GPG Key ID: 2A90361F99CF1795
3 changed files with 18 additions and 8 deletions

View 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
})

View File

@ -1,15 +1,16 @@
{ stdenv, fetchurl }: { stdenv, fetchurl
, version, sha256, patches ? []
, ...
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "patchutils-0.3.3"; pname = "patchutils";
inherit version patches;
src = fetchurl { src = fetchurl {
url = "http://cyberelk.net/tim/data/patchutils/stable/${name}.tar.xz"; url = "http://cyberelk.net/tim/data/patchutils/stable/${pname}-${version}.tar.xz";
sha256 = "0g5df00cj4nczrmr4k791l7la0sq2wnf8rn981fsrz1f3d2yix4i"; inherit sha256;
}; };
patches = [ ./drop-comments.patch ]; # we would get into a cycle when using fetchpatch on this one
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
doCheck = false; # fails doCheck = false; # fails

View File

@ -4881,7 +4881,9 @@ in
parcellite = callPackage ../tools/misc/parcellite { }; parcellite = callPackage ../tools/misc/parcellite { };
patchutils = callPackage ../tools/text/patchutils { }; patchutils = patchutils_0_3_3;
patchutils_0_3_3 = callPackage ../tools/text/patchutils/0.3.3.nix { };
parted = callPackage ../tools/misc/parted { }; parted = callPackage ../tools/misc/parted { };