lol

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.

+16 -18
+3 -3
pkgs/development/libraries/nettle/default.nix
··· 1 - { callPackage, fetchurl, ... } @ args: 1 + { callPackage, fetchurl }: 2 2 3 - callPackage ./generic.nix (args // rec { 3 + callPackage ./generic.nix rec { 4 4 version = "3.7.2"; 5 5 6 6 src = fetchurl { 7 7 url = "mirror://gnu/nettle/nettle-${version}.tar.gz"; 8 8 sha256 = "0qpi1qp3bcvqdsaxy2pzg530db95x8qjahkynxgwvr6dy5760ald"; 9 9 }; 10 - }) 10 + }
+12 -14
pkgs/development/libraries/nettle/generic.nix
··· 2 2 3 3 # Version specific args 4 4 , version, src 5 - , ...}: 5 + }: 6 6 7 - stdenv.mkDerivation ({ 7 + stdenv.mkDerivation { 8 8 name = "nettle-${version}"; 9 9 10 10 inherit src; ··· 16 16 nativeBuildInputs = [ gnum4 ]; 17 17 propagatedBuildInputs = [ gmp ]; 18 18 19 - configureFlags = [ "--enable-fat" ]; # runtime selection of HW-accelerated code; it's default since 3.7 19 + configureFlags = 20 + # runtime selection of HW-accelerated code; it's default since 3.7 21 + [ "--enable-fat" ] 22 + # Make sure the right <gmp.h> is found, and not the incompatible 23 + # /usr/include/mp.h from OpenSolaris. See 24 + # <https://lists.gnu.org/archive/html/hydra-users/2012-08/msg00000.html> 25 + # for details. 26 + ++ lib.optional stdenv.isSunOS "--with-include-path=${gmp.dev}/include"; 20 27 21 28 doCheck = (stdenv.hostPlatform.system != "i686-cygwin" && !stdenv.isDarwin); 22 29 ··· 53 60 54 61 license = licenses.gpl2Plus; 55 62 56 - homepage = "http://www.lysator.liu.se/~nisse/nettle/"; 63 + homepage = "https://www.lysator.liu.se/~nisse/nettle/"; 57 64 58 65 platforms = platforms.all; 66 + maintainers = [ maintainers.vcunat ]; 59 67 }; 60 68 } 61 - 62 - // 63 - 64 - lib.optionalAttrs stdenv.isSunOS { 65 - # Make sure the right <gmp.h> is found, and not the incompatible 66 - # /usr/include/mp.h from OpenSolaris. See 67 - # <https://lists.gnu.org/archive/html/hydra-users/2012-08/msg00000.html> 68 - # for details. 69 - configureFlags = [ "--with-include-path=${gmp.dev}/include" ]; 70 - })
+1 -1
pkgs/top-level/all-packages.nix
··· 16306 16306 openssl = openssl_1_0_2; 16307 16307 }; 16308 16308 16309 - nettle = callPackage ../development/libraries/nettle { }; 16309 + nettle = import ../development/libraries/nettle { inherit callPackage fetchurl; }; 16310 16310 16311 16311 newman = callPackage ../development/web/newman {}; 16312 16312