From 2bbb78ab946e76be02dc96dfcfc644cdcd2adb79 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Mon, 8 Feb 2010 13:58:25 +0000 Subject: [PATCH] use gmp 4.3.2 on i686-darwin svn path=/nixpkgs/trunk/; revision=19864 --- pkgs/development/libraries/gmp/4.3.2.nix | 24 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 15 +++++++++++---- 2 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 pkgs/development/libraries/gmp/4.3.2.nix diff --git a/pkgs/development/libraries/gmp/4.3.2.nix b/pkgs/development/libraries/gmp/4.3.2.nix new file mode 100644 index 000000000000..541fabddd441 --- /dev/null +++ b/pkgs/development/libraries/gmp/4.3.2.nix @@ -0,0 +1,24 @@ +{stdenv, fetchurl, m4, cxx ? true}: + +stdenv.mkDerivation rec { + name = "gmp-4.3.1"; + + src = fetchurl { + url = "mirror://gnu/gmp/${name}.tar.bz2"; + sha256 = "1j5pklq36ivg2cim5wfysns229a544lqkimp3mlzkwjl513ra0ma"; + }; + + buildInputs = [m4]; + + preConfigure = "ln -sf configfsf.guess config.guess"; + + configureFlags = if cxx then "--enable-cxx" else "--disable-cxx"; + + doCheck = true; + + meta = { + description = "A free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers"; + homepage = http://gmplib.org/; + license = "LGPL"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d5a237565183..3c4dbae5713d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3736,10 +3736,17 @@ let inherit fetchurl stdenv; }; - gmp = makeOverridable (import ../development/libraries/gmp) { - inherit stdenv fetchurl m4; - cxx = false; - }; + gmp = + if stdenv.system == "i686-darwin" then + makeOverridable (import ../development/libraries/gmp/4.3.2.nix) { + inherit stdenv fetchurl m4; + cxx = false; + } + else + makeOverridable (import ../development/libraries/gmp) { + inherit stdenv fetchurl m4; + cxx = false; + }; gmpxx = gmp.override { cxx = true; };