summary refs log tree commit diff
path: root/pkgs/development/libraries/nettle
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2021-03-22 11:00:37 +0100
committerVladimír Čunát <v@cunat.cz>2021-03-22 11:06:08 +0100
commite82d74132cd65d2c8aa0f1714fed0fcc39238f89 (patch)
tree22c202dad1b3ca10fb9f9d8e795412de759df956 /pkgs/development/libraries/nettle
parentf688168abb7724c9cff22aa764786e444c8f5573 (diff)
downloadnixpkgs-e82d74132cd65d2c8aa0f1714fed0fcc39238f89.tar
nixpkgs-e82d74132cd65d2c8aa0f1714fed0fcc39238f89.tar.gz
nixpkgs-e82d74132cd65d2c8aa0f1714fed0fcc39238f89.tar.bz2
nixpkgs-e82d74132cd65d2c8aa0f1714fed0fcc39238f89.tar.lz
nixpkgs-e82d74132cd65d2c8aa0f1714fed0fcc39238f89.tar.xz
nixpkgs-e82d74132cd65d2c8aa0f1714fed0fcc39238f89.tar.zst
nixpkgs-e82d74132cd65d2c8aa0f1714fed0fcc39238f89.zip
nettle: start maintaining the expression
- consolidate configureFlags
- remove double callPackage; I suspect it's unhealthy for overrides

We haven't needed multiple nettle versions for years I think (d3e488c),
but the split to {default,generic}.nix doesn't seem problematic,
so I kept it to avoid making the history slightly harder to follow.
Diffstat (limited to 'pkgs/development/libraries/nettle')
-rw-r--r--pkgs/development/libraries/nettle/default.nix6
-rw-r--r--pkgs/development/libraries/nettle/generic.nix26
2 files changed, 15 insertions, 17 deletions
diff --git a/pkgs/development/libraries/nettle/default.nix b/pkgs/development/libraries/nettle/default.nix
index 343118fb587..3eec9c97ff1 100644
--- a/pkgs/development/libraries/nettle/default.nix
+++ b/pkgs/development/libraries/nettle/default.nix
@@ -1,10 +1,10 @@
-{ callPackage, fetchurl, ... } @ args:
+{ callPackage, fetchurl }:
 
-callPackage ./generic.nix (args // rec {
+callPackage ./generic.nix rec {
   version = "3.7.2";
 
   src = fetchurl {
     url = "mirror://gnu/nettle/nettle-${version}.tar.gz";
     sha256 = "0qpi1qp3bcvqdsaxy2pzg530db95x8qjahkynxgwvr6dy5760ald";
   };
-})
+}
diff --git a/pkgs/development/libraries/nettle/generic.nix b/pkgs/development/libraries/nettle/generic.nix
index edaebc21352..348faf56b56 100644
--- a/pkgs/development/libraries/nettle/generic.nix
+++ b/pkgs/development/libraries/nettle/generic.nix
@@ -2,9 +2,9 @@
 
 # Version specific args
 , version, src
-, ...}:
+}:
 
-stdenv.mkDerivation ({
+stdenv.mkDerivation {
   name = "nettle-${version}";
 
   inherit src;
@@ -16,7 +16,14 @@ stdenv.mkDerivation ({
   nativeBuildInputs = [ gnum4 ];
   propagatedBuildInputs = [ gmp ];
 
-  configureFlags = [ "--enable-fat" ]; # runtime selection of HW-accelerated code; it's default since 3.7
+  configureFlags =
+    # runtime selection of HW-accelerated code; it's default since 3.7
+    [ "--enable-fat" ]
+    # Make sure the right <gmp.h> is found, and not the incompatible
+    # /usr/include/mp.h from OpenSolaris.  See
+    # <https://lists.gnu.org/archive/html/hydra-users/2012-08/msg00000.html>
+    # for details.
+    ++ lib.optional stdenv.isSunOS "--with-include-path=${gmp.dev}/include";
 
   doCheck = (stdenv.hostPlatform.system != "i686-cygwin" && !stdenv.isDarwin);
 
@@ -53,18 +60,9 @@ stdenv.mkDerivation ({
 
      license = licenses.gpl2Plus;
 
-     homepage = "http://www.lysator.liu.se/~nisse/nettle/";
+     homepage = "https://www.lysator.liu.se/~nisse/nettle/";
 
      platforms = platforms.all;
+     maintainers = [ maintainers.vcunat ];
   };
 }
-
-//
-
-lib.optionalAttrs stdenv.isSunOS {
-  # Make sure the right <gmp.h> is found, and not the incompatible
-  # /usr/include/mp.h from OpenSolaris.  See
-  # <https://lists.gnu.org/archive/html/hydra-users/2012-08/msg00000.html>
-  # for details.
-  configureFlags = [ "--with-include-path=${gmp.dev}/include" ];
-})