From e08b9ab8d3d6362c774a786797347fa7483af773 Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Wed, 26 Nov 2014 15:16:50 -0800 Subject: kill libiconvOr* Conflicts: pkgs/applications/networking/mailreaders/sup/default.nix pkgs/development/compilers/ghc/7.8.3-binary.nix pkgs/development/interpreters/php/5.3.nix pkgs/development/interpreters/ruby/patches.nix pkgs/development/libraries/cairo/default.nix pkgs/development/libraries/poppler/default.nix pkgs/top-level/all-packages.nix --- pkgs/top-level/all-packages.nix | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'pkgs/top-level') diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8efb185bcdea..85988f8490b7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6244,19 +6244,10 @@ let libgsf = callPackage ../development/libraries/libgsf { }; - libiconv = callPackage ../development/libraries/libiconv { }; - - libiconvOrEmpty = if libiconvOrNull == null then [] else [libiconv]; - - libiconvOrNull = - if stdenv.cc.libc or null != null || stdenv.isGlibc - then null - else libiconv; - - # The logic behind this attribute is broken: libiconvOrNull==null does - # NOT imply libiconv=glibc! On Darwin, for example, we have a native - # libiconv library which is not glibc. - libiconvOrLibc = if libiconvOrNull == null then stdenv.cc.libc else libiconv; + libiconv = + if stdenv.isGlibc + then stdenv.cc.libc + else callPackage ../development/libraries/libiconv { }; # On non-GNU systems we need GNU Gettext for libintl. libintlOrEmpty = stdenv.lib.optional (!stdenv.isLinux) gettext; -- cgit 1.4.1 From f2a376f52a49e1cc563b9a3d34a8be9194a33bcd Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Mon, 19 Jan 2015 18:32:10 +0100 Subject: 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. --- pkgs/development/libraries/gmp/5.1.x.nix | 9 ++++----- pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/haskell-ng.nix | 16 ++++++++-------- 3 files changed, 13 insertions(+), 14 deletions(-) (limited to 'pkgs/top-level') diff --git a/pkgs/development/libraries/gmp/5.1.x.nix b/pkgs/development/libraries/gmp/5.1.x.nix index 5e1282c1d505..0df1a4f8cd83 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; } -) - diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 299cd0afd44b..c0cec16ca049 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3494,7 +3494,7 @@ let # Import Haskell infrastructure. - haskell = let pkgs_ = pkgs // { gmp = gmp.override { withStatic = true; }; }; + haskell = let pkgs_ = pkgs // { /* add necessary overrides here */ }; callPackage = newScope pkgs_; newScope = extra: lib.callPackageWith (pkgs_ // pkgs_.xorg // extra); in callPackage ./haskell-defaults.nix { pkgs = pkgs_; inherit callPackage newScope; }; diff --git a/pkgs/top-level/haskell-ng.nix b/pkgs/top-level/haskell-ng.nix index 2e0d61f18733..6a55023d3589 100644 --- a/pkgs/top-level/haskell-ng.nix +++ b/pkgs/top-level/haskell-ng.nix @@ -14,24 +14,24 @@ rec { libiconv = pkgs.darwin.libiconv; }); - ghc6104 = callPackage ../development/compilers/ghc/6.10.4.nix { ghc = compiler.ghc6102Binary; gmp = pkgs.gmp.override { withStatic = true; }; }; - ghc6123 = callPackage ../development/compilers/ghc/6.12.3.nix { ghc = compiler.ghc6102Binary; gmp = pkgs.gmp.override { withStatic = true; }; }; - ghc704 = callPackage ../development/compilers/ghc/7.0.4.nix ({ ghc = compiler.ghc704Binary; gmp = pkgs.gmp.override { withStatic = true; }; } // stdenv.lib.optionalAttrs stdenv.isDarwin { + ghc6104 = callPackage ../development/compilers/ghc/6.10.4.nix { ghc = compiler.ghc6102Binary; }; + ghc6123 = callPackage ../development/compilers/ghc/6.12.3.nix { ghc = compiler.ghc6102Binary; }; + ghc704 = callPackage ../development/compilers/ghc/7.0.4.nix ({ ghc = compiler.ghc704Binary; } // stdenv.lib.optionalAttrs stdenv.isDarwin { libiconv = pkgs.darwin.libiconv; }); - ghc722 = callPackage ../development/compilers/ghc/7.2.2.nix ({ ghc = compiler.ghc704Binary; gmp = pkgs.gmp.override { withStatic = true; }; } // stdenv.lib.optionalAttrs stdenv.isDarwin { + ghc722 = callPackage ../development/compilers/ghc/7.2.2.nix ({ ghc = compiler.ghc704Binary; } // stdenv.lib.optionalAttrs stdenv.isDarwin { libiconv = pkgs.darwin.libiconv; }); - ghc742 = callPackage ../development/compilers/ghc/7.4.2.nix ({ ghc = compiler.ghc704Binary; gmp = pkgs.gmp.override { withStatic = true; }; } // stdenv.lib.optionalAttrs stdenv.isDarwin { + ghc742 = callPackage ../development/compilers/ghc/7.4.2.nix ({ ghc = compiler.ghc704Binary; } // stdenv.lib.optionalAttrs stdenv.isDarwin { libiconv = pkgs.darwin.libiconv; }); - ghc763 = callPackage ../development/compilers/ghc/7.6.3.nix ({ ghc = compiler.ghc704Binary; gmp = pkgs.gmp.override { withStatic = true; }; } // stdenv.lib.optionalAttrs stdenv.isDarwin { + ghc763 = callPackage ../development/compilers/ghc/7.6.3.nix ({ ghc = compiler.ghc704Binary; } // stdenv.lib.optionalAttrs stdenv.isDarwin { libiconv = pkgs.darwin.libiconv; }); - ghc784 = callPackage ../development/compilers/ghc/7.8.4.nix ({ ghc = compiler.ghc742Binary; gmp = pkgs.gmp.override { withStatic = true; }; } // stdenv.lib.optionalAttrs stdenv.isDarwin { + ghc784 = callPackage ../development/compilers/ghc/7.8.4.nix ({ ghc = compiler.ghc742Binary; } // stdenv.lib.optionalAttrs stdenv.isDarwin { libiconv = pkgs.darwin.libiconv; }); - ghc7101 = callPackage ../development/compilers/ghc/7.10.1.nix ({ ghc = compiler.ghc784; gmp = pkgs.gmp.override { withStatic = true; }; } // stdenv.lib.optionalAttrs stdenv.isDarwin { + ghc7101 = callPackage ../development/compilers/ghc/7.10.1.nix ({ ghc = compiler.ghc784; } // stdenv.lib.optionalAttrs stdenv.isDarwin { libiconv = pkgs.darwin.libiconv; }); ghcHEAD = callPackage ../development/compilers/ghc/head.nix ({ inherit (packages.ghc784) ghc alex happy; } // stdenv.lib.optionalAttrs stdenv.isDarwin { -- cgit 1.4.1