From c8afc263df71303d0e26c795354bcf1a5aa29423 Mon Sep 17 00:00:00 2001 From: Bob van der Linden Date: Sat, 13 Apr 2019 23:09:44 +0200 Subject: patchutils: generalize package --- pkgs/tools/text/patchutils/0.3.3.nix | 7 +++++++ pkgs/tools/text/patchutils/default.nix | 26 -------------------------- pkgs/tools/text/patchutils/generic.nix | 27 +++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 26 deletions(-) create mode 100644 pkgs/tools/text/patchutils/0.3.3.nix delete mode 100644 pkgs/tools/text/patchutils/default.nix create mode 100644 pkgs/tools/text/patchutils/generic.nix (limited to 'pkgs/tools/text') 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/default.nix deleted file mode 100644 index 238676020e8..00000000000 --- a/pkgs/tools/text/patchutils/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ stdenv, fetchurl }: - -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" ]; - }; -} diff --git a/pkgs/tools/text/patchutils/generic.nix b/pkgs/tools/text/patchutils/generic.nix new file mode 100644 index 00000000000..87d925e333f --- /dev/null +++ b/pkgs/tools/text/patchutils/generic.nix @@ -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" ]; + }; +} -- cgit 1.4.1 From 81e9ddfd7217583b7af3335d7aa098309a946cce Mon Sep 17 00:00:00 2001 From: Bob van der Linden Date: Sat, 13 Apr 2019 23:12:32 +0200 Subject: patchutils: add version 0.3.4 --- pkgs/tools/text/patchutils/0.3.4.nix | 6 ++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 8 insertions(+) create mode 100644 pkgs/tools/text/patchutils/0.3.4.nix (limited to 'pkgs/tools/text') diff --git a/pkgs/tools/text/patchutils/0.3.4.nix b/pkgs/tools/text/patchutils/0.3.4.nix new file mode 100644 index 00000000000..eab0e98f95c --- /dev/null +++ b/pkgs/tools/text/patchutils/0.3.4.nix @@ -0,0 +1,6 @@ +{ callPackage, ... } @ args: + +callPackage ./generic.nix (args // rec { + version = "0.3.4"; + sha256 = "0xp8mcfyi5nmb5a2zi5ibmyshxkb1zv1dgmnyn413m7ahgdx8mfg"; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 261283800d7..0291fccab14 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4883,6 +4883,8 @@ in patchutils = patchutils_0_3_3; + patchutils_0_3_4 = callPackage ../tools/text/patchutils/0.3.4.nix { }; + patchutils_0_3_3 = callPackage ../tools/text/patchutils/0.3.3.nix { }; parted = callPackage ../tools/misc/parted { }; -- cgit 1.4.1 From 1d883a0fde15ee934a10f33364b71d799f42ece9 Mon Sep 17 00:00:00 2001 From: Bob van der Linden Date: Sun, 14 Apr 2019 13:57:40 +0200 Subject: patchutils: rename 0.3.4 to default --- pkgs/tools/text/patchutils/0.3.4.nix | 6 ------ pkgs/tools/text/patchutils/default.nix | 6 ++++++ pkgs/top-level/all-packages.nix | 4 +--- 3 files changed, 7 insertions(+), 9 deletions(-) delete mode 100644 pkgs/tools/text/patchutils/0.3.4.nix create mode 100644 pkgs/tools/text/patchutils/default.nix (limited to 'pkgs/tools/text') diff --git a/pkgs/tools/text/patchutils/0.3.4.nix b/pkgs/tools/text/patchutils/0.3.4.nix deleted file mode 100644 index eab0e98f95c..00000000000 --- a/pkgs/tools/text/patchutils/0.3.4.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ callPackage, ... } @ args: - -callPackage ./generic.nix (args // rec { - version = "0.3.4"; - sha256 = "0xp8mcfyi5nmb5a2zi5ibmyshxkb1zv1dgmnyn413m7ahgdx8mfg"; -}) diff --git a/pkgs/tools/text/patchutils/default.nix b/pkgs/tools/text/patchutils/default.nix new file mode 100644 index 00000000000..eab0e98f95c --- /dev/null +++ b/pkgs/tools/text/patchutils/default.nix @@ -0,0 +1,6 @@ +{ callPackage, ... } @ args: + +callPackage ./generic.nix (args // rec { + version = "0.3.4"; + sha256 = "0xp8mcfyi5nmb5a2zi5ibmyshxkb1zv1dgmnyn413m7ahgdx8mfg"; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cc3087cc31b..f85d9c3b742 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4881,9 +4881,7 @@ in parcellite = callPackage ../tools/misc/parcellite { }; - patchutils = patchutils_0_3_4; - - patchutils_0_3_4 = callPackage ../tools/text/patchutils/0.3.4.nix { }; + patchutils = callPackage ../tools/text/patchutils { }; patchutils_0_3_3 = callPackage ../tools/text/patchutils/0.3.3.nix { }; -- cgit 1.4.1