summary refs log tree commit diff
path: root/pkgs/development/libraries/gmp
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2015-01-19 18:32:10 +0100
committerPeter Simons <simons@cryp.to>2015-02-13 22:18:27 +0100
commitf2a376f52a49e1cc563b9a3d34a8be9194a33bcd (patch)
tree967ea4a4b5e55ed5a30a6f340b5077559da952f7 /pkgs/development/libraries/gmp
parent600135bba506ae93bf418cc484b3d9953a37f9de (diff)
downloadnixpkgs-f2a376f52a49e1cc563b9a3d34a8be9194a33bcd.tar
nixpkgs-f2a376f52a49e1cc563b9a3d34a8be9194a33bcd.tar.gz
nixpkgs-f2a376f52a49e1cc563b9a3d34a8be9194a33bcd.tar.bz2
nixpkgs-f2a376f52a49e1cc563b9a3d34a8be9194a33bcd.tar.lz
nixpkgs-f2a376f52a49e1cc563b9a3d34a8be9194a33bcd.tar.xz
nixpkgs-f2a376f52a49e1cc563b9a3d34a8be9194a33bcd.tar.zst
nixpkgs-f2a376f52a49e1cc563b9a3d34a8be9194a33bcd.zip
Enable static libraries in "gmp" to allow static linking of Haskell programs.
Haskell programs depend on gmp to implement the unbounded Integer type. Without
static variants of gmp we cannot build statically linked Haskell programs, what
some users have found desirable in the past. So far, we've used an override to
derive our own copy of gmp in the Haskell ecosystem, but this patch ends the
dichotomy between Haskell and the rest of Nixpkgs by enabling static gmp
libraries in the default build default.
Diffstat (limited to 'pkgs/development/libraries/gmp')
-rw-r--r--pkgs/development/libraries/gmp/5.1.x.nix9
1 files changed, 4 insertions, 5 deletions
diff --git a/pkgs/development/libraries/gmp/5.1.x.nix b/pkgs/development/libraries/gmp/5.1.x.nix
index 5e1282c1d50..0df1a4f8cd8 100644
--- a/pkgs/development/libraries/gmp/5.1.x.nix
+++ b/pkgs/development/libraries/gmp/5.1.x.nix
@@ -1,8 +1,8 @@
-{ stdenv, fetchurl, m4, cxx ? true, withStatic ? false }:
+{ stdenv, fetchurl, m4, cxx ? true, withStatic ? true }:
 
 with { inherit (stdenv.lib) optional; };
 
-stdenv.mkDerivation (rec {
+stdenv.mkDerivation rec {
   name = "gmp-5.1.3";
 
   src = fetchurl { # we need to use bz2, others aren't in bootstrapping stdenv
@@ -30,6 +30,8 @@ stdenv.mkDerivation (rec {
 
   doCheck = true;
 
+  dontDisableStatic = withStatic;
+
   enableParallelBuilding = true;
 
   meta = with stdenv.lib; {
@@ -63,6 +65,3 @@ stdenv.mkDerivation (rec {
     maintainers = [ maintainers.simons ];
   };
 }
-  // stdenv.lib.optionalAttrs withStatic { dontDisableStatic = true; }
-)
-