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.
This commit is contained in:
@@ -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; }
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user