1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-02 02:24:27 +00:00

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.
This commit is contained in:
Vladimír Čunát 2021-03-22 11:00:37 +01:00
parent f688168abb
commit e82d74132c
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
3 changed files with 16 additions and 18 deletions

View file

@ -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";
};
})
}

View file

@ -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" ];
})

View file

@ -16306,7 +16306,7 @@ in
openssl = openssl_1_0_2;
};
nettle = callPackage ../development/libraries/nettle { };
nettle = import ../development/libraries/nettle { inherit callPackage fetchurl; };
newman = callPackage ../development/web/newman {};