summary refs log tree commit diff
path: root/pkgs/tools/text/patchutils
diff options
context:
space:
mode:
authorBob van der Linden <bobvanderlinden@gmail.com>2019-04-13 23:09:44 +0200
committerBob van der Linden <bobvanderlinden@gmail.com>2019-04-13 23:11:07 +0200
commitc8afc263df71303d0e26c795354bcf1a5aa29423 (patch)
treee49f076f6d98e5aeb417164fac22ad05c80143e5 /pkgs/tools/text/patchutils
parent77dcb9e619c73b51e5b66e5679f1b64df6438069 (diff)
downloadnixpkgs-c8afc263df71303d0e26c795354bcf1a5aa29423.tar
nixpkgs-c8afc263df71303d0e26c795354bcf1a5aa29423.tar.gz
nixpkgs-c8afc263df71303d0e26c795354bcf1a5aa29423.tar.bz2
nixpkgs-c8afc263df71303d0e26c795354bcf1a5aa29423.tar.lz
nixpkgs-c8afc263df71303d0e26c795354bcf1a5aa29423.tar.xz
nixpkgs-c8afc263df71303d0e26c795354bcf1a5aa29423.tar.zst
nixpkgs-c8afc263df71303d0e26c795354bcf1a5aa29423.zip
patchutils: generalize package
Diffstat (limited to 'pkgs/tools/text/patchutils')
-rw-r--r--pkgs/tools/text/patchutils/0.3.3.nix7
-rw-r--r--pkgs/tools/text/patchutils/generic.nix (renamed from pkgs/tools/text/patchutils/default.nix)15
2 files changed, 15 insertions, 7 deletions
diff --git a/pkgs/tools/text/patchutils/0.3.3.nix b/pkgs/tools/text/patchutils/0.3.3.nix
new file mode 100644
index 00000000000..b324137be6a
--- /dev/null
+++ b/pkgs/tools/text/patchutils/0.3.3.nix
@@ -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
+})
diff --git a/pkgs/tools/text/patchutils/default.nix b/pkgs/tools/text/patchutils/generic.nix
index 238676020e8..87d925e333f 100644
--- a/pkgs/tools/text/patchutils/default.nix
+++ b/pkgs/tools/text/patchutils/generic.nix
@@ -1,15 +1,16 @@
-{ stdenv, fetchurl }:
-
+{ stdenv, fetchurl
+, version, sha256, patches ? []
+, ...
+}:
 stdenv.mkDerivation rec {
-  name = "patchutils-0.3.3";
+  pname = "patchutils";
+  inherit version patches;
 
   src = fetchurl {
-    url = "http://cyberelk.net/tim/data/patchutils/stable/${name}.tar.xz";
-    sha256 = "0g5df00cj4nczrmr4k791l7la0sq2wnf8rn981fsrz1f3d2yix4i";
+    url = "http://cyberelk.net/tim/data/patchutils/stable/${pname}-${version}.tar.xz";
+    inherit sha256;
   };
 
-  patches = [ ./drop-comments.patch ]; # we would get into a cycle when using fetchpatch on this one
-
   hardeningDisable = [ "format" ];
 
   doCheck = false; # fails