diff options
Diffstat (limited to 'pkgs/development/libraries/gmp')
-rw-r--r-- | pkgs/development/libraries/gmp/4.3.2.nix | 10 | ||||
-rw-r--r-- | pkgs/development/libraries/gmp/5.1.x.nix | 13 | ||||
-rw-r--r-- | pkgs/development/libraries/gmp/6.x.nix | 19 |
3 files changed, 23 insertions, 19 deletions
diff --git a/pkgs/development/libraries/gmp/4.3.2.nix b/pkgs/development/libraries/gmp/4.3.2.nix index 29310aa9f00..ce870581f5e 100644 --- a/pkgs/development/libraries/gmp/4.3.2.nix +++ b/pkgs/development/libraries/gmp/4.3.2.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, m4, cxx ? true }: +{ lib, stdenv, fetchurl, m4, cxx ? true }: let self = stdenv.mkDerivation rec { name = "gmp-4.3.2"; @@ -28,8 +28,8 @@ let self = stdenv.mkDerivation rec { else ''echo "Darwin host is `./config.guess`."''; configureFlags = [ - (stdenv.lib.enableFeature cxx "cxx") - ] ++ stdenv.lib.optionals stdenv.isDarwin [ + (lib.enableFeature cxx "cxx") + ] ++ lib.optionals stdenv.isDarwin [ "ac_cv_build=x86_64-apple-darwin13.4.0" "ac_cv_host=x86_64-apple-darwin13.4.0" ]; @@ -65,10 +65,10 @@ let self = stdenv.mkDerivation rec { ''; homepage = "https://gmplib.org/"; - license = stdenv.lib.licenses.lgpl3Plus; + license = lib.licenses.lgpl3Plus; maintainers = [ ]; - platforms = stdenv.lib.platforms.all; + platforms = lib.platforms.all; badPlatforms = [ "x86_64-darwin" ]; }; }; diff --git a/pkgs/development/libraries/gmp/5.1.x.nix b/pkgs/development/libraries/gmp/5.1.x.nix index a027d58de39..73061a3d2ef 100644 --- a/pkgs/development/libraries/gmp/5.1.x.nix +++ b/pkgs/development/libraries/gmp/5.1.x.nix @@ -1,6 +1,9 @@ -{ stdenv, fetchurl, m4, cxx ? true, withStatic ? true }: +{ lib, stdenv, fetchurl, m4 +, cxx ? true +, withStatic ? stdenv.hostPlatform.isStatic +}: -let inherit (stdenv.lib) optional; in +let inherit (lib) optional; in let self = stdenv.mkDerivation rec { name = "gmp-5.1.3"; @@ -22,13 +25,13 @@ let self = stdenv.mkDerivation rec { configureFlags = [ "--with-pic" - (stdenv.lib.enableFeature cxx "cxx") + (lib.enableFeature cxx "cxx") # Build a "fat binary", with routines for several sub-architectures # (x86), except on Solaris where some tests crash with "Memory fault". # See <https://hydra.nixos.org/build/2760931>, for instance. # # no darwin because gmp uses ASM that clang doesn't like - (stdenv.lib.enableFeature (!stdenv.isSunOS && stdenv.hostPlatform.isx86) "fat") + (lib.enableFeature (!stdenv.isSunOS && stdenv.hostPlatform.isx86) "fat") # The config.guess in GMP tries to runtime-detect various # ARM optimization flags via /proc/cpuinfo (and is also # broken on multicore CPUs). Avoid this impurity. @@ -43,7 +46,7 @@ let self = stdenv.mkDerivation rec { enableParallelBuilding = true; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://gmplib.org/"; description = "GNU multiple precision arithmetic library"; license = licenses.gpl3Plus; diff --git a/pkgs/development/libraries/gmp/6.x.nix b/pkgs/development/libraries/gmp/6.x.nix index f4432cfc5b8..177c1567052 100644 --- a/pkgs/development/libraries/gmp/6.x.nix +++ b/pkgs/development/libraries/gmp/6.x.nix @@ -1,21 +1,22 @@ -{ stdenv, fetchurl, m4 +{ lib, stdenv, fetchurl, m4 , cxx ? !stdenv.hostPlatform.useAndroidPrebuilt && !stdenv.hostPlatform.isWasm , buildPackages -, withStatic ? false }: +, withStatic ? stdenv.hostPlatform.isStatic +}: # Note: this package is used for bootstrapping fetchurl, and thus # cannot use fetchpatch! All mutable patches (generated by GitHub or # cgit) that are needed here should be included directly in Nixpkgs as # files. -let inherit (stdenv.lib) optional; in +let inherit (lib) optional; in let self = stdenv.mkDerivation rec { - name = "gmp-6.2.0"; + name = "gmp-6.2.1"; src = fetchurl { # we need to use bz2, others aren't in bootstrapping stdenv urls = [ "mirror://gnu/gmp/${name}.tar.bz2" "ftp://ftp.gmplib.org/pub/${name}/${name}.tar.bz2" ]; - sha256 = "1sji8i9yjzfv5l2fsadpgjfyn452q6ab9zvm02k23ssd275rj77m"; + sha256 = "0z2ddfiwgi0xbf65z4fg4hqqzlhv0cc6hdcswf3c6n21xdmk5sga"; }; #outputs TODO: split $cxx due to libstdc++ dependency @@ -29,13 +30,13 @@ let self = stdenv.mkDerivation rec { configureFlags = [ "--with-pic" - (stdenv.lib.enableFeature cxx "cxx") + (lib.enableFeature cxx "cxx") # Build a "fat binary", with routines for several sub-architectures # (x86), except on Solaris where some tests crash with "Memory fault". # See <https://hydra.nixos.org/build/2760931>, for instance. # # no darwin because gmp uses ASM that clang doesn't like - (stdenv.lib.enableFeature (!stdenv.isSunOS && stdenv.hostPlatform.isx86) "fat") + (lib.enableFeature (!stdenv.isSunOS && stdenv.hostPlatform.isx86) "fat") # The config.guess in GMP tries to runtime-detect various # ARM optimization flags via /proc/cpuinfo (and is also # broken on multicore CPUs). Avoid this impurity. @@ -45,7 +46,7 @@ let self = stdenv.mkDerivation rec { # to build a .dll on windows, we need --disable-static + --enable-shared # see https://gmplib.org/manual/Notes-for-Particular-Systems.html ++ optional (!withStatic && stdenv.hostPlatform.isWindows) "--disable-static --enable-shared" - ; + ++ optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) "--disable-assembly"; doCheck = true; # not cross; @@ -53,7 +54,7 @@ let self = stdenv.mkDerivation rec { enableParallelBuilding = true; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://gmplib.org/"; description = "GNU multiple precision arithmetic library"; license = licenses.gpl3Plus; |