diff options
author | Timo Kaufmann <timokau@zoho.com> | 2018-03-08 00:14:05 +0100 |
---|---|---|
committer | Timo Kaufmann <timokau@zoho.com> | 2018-03-16 00:52:12 +0100 |
commit | f07b330effc24307f1e15c0c528df4f6f9ce3006 (patch) | |
tree | 43c292da01e8216f9600e6695836ed8597c25143 /pkgs/development/libraries/linbox | |
parent | b778e99fc38ccaacb4b6d05db9533f46f0e0f891 (diff) | |
download | nixpkgs-f07b330effc24307f1e15c0c528df4f6f9ce3006.tar nixpkgs-f07b330effc24307f1e15c0c528df4f6f9ce3006.tar.gz nixpkgs-f07b330effc24307f1e15c0c528df4f6f9ce3006.tar.bz2 nixpkgs-f07b330effc24307f1e15c0c528df4f6f9ce3006.tar.lz nixpkgs-f07b330effc24307f1e15c0c528df4f6f9ce3006.tar.xz nixpkgs-f07b330effc24307f1e15c0c528df4f6f9ce3006.tar.zst nixpkgs-f07b330effc24307f1e15c0c528df4f6f9ce3006.zip |
linbox: init at 1.5.2
Diffstat (limited to 'pkgs/development/libraries/linbox')
-rw-r--r-- | pkgs/development/libraries/linbox/default.nix | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/pkgs/development/libraries/linbox/default.nix b/pkgs/development/libraries/linbox/default.nix new file mode 100644 index 00000000000..0f5442bd63b --- /dev/null +++ b/pkgs/development/libraries/linbox/default.nix @@ -0,0 +1,79 @@ +{ stdenv +, fetchFromGitHub +, fetchpatch +, autoreconfHook +, givaro +, pkgconfig +, openblas +, liblapack +, fflas-ffpack +, gmpxx +, optimize ? false # impure +, withSage ? false # sage support +}: +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + pname = "linbox"; + version = "1.5.2"; + + src = fetchFromGitHub { + owner = "linbox-team"; + repo = "${pname}"; + rev = "v${version}"; + sha256 = "1wfivlwp30mzdy1697w7rzb8caajim50mc8h27k82yipn2qc5n4i"; + }; + + nativeBuildInputs = [ + autoreconfHook + pkgconfig + ]; + + buildInputs = [ + givaro + (liblapack.override {shared = true;}) + openblas + gmpxx + fflas-ffpack + ]; + + configureFlags = [ + "--with-blas-libs=-lopenblas" + "--with-lapack-libs=-llapack" + "--disable-optimization" + ] ++ stdenv.lib.optionals (!optimize) [ + # disable SIMD instructions (which are enabled *when available* by default) + "--disable-sse" + "--disable-sse2" + "--disable-sse3" + "--disable-ssse3" + "--disable-sse41" + "--disable-sse42" + "--disable-avx" + "--disable-avx2" + "--disable-fma" + "--disable-fma4" + ] ++ stdenv.lib.optionals withSage [ + "--enable-sage" + ]; + + patches = stdenv.lib.optionals withSage [ + # https://trac.sagemath.org/ticket/24214#comment:39 + # Will be resolved by + # https://github.com/linbox-team/linbox/issues/69 + (fetchpatch { + url = "https://raw.githubusercontent.com/sagemath/sage/a843f48b7a4267e44895a3dfa892c89c85b85611/build/pkgs/linbox/patches/linbox_charpoly_fullCRA.patch"; + sha256 = "16nxfzfknra3k2yk3xy0k8cq9rmnmsch3dnkb03kx15h0y0jmibk"; + }) + ]; + + doCheck = true; + + meta = { + inherit version; + description = "C++ library for exact, high-performance linear algebra"; + license = stdenv.lib.licenses.lgpl21Plus; + maintainers = [stdenv.lib.maintainers.timokau]; + platforms = stdenv.lib.platforms.linux; + homepage = http://linalg.org/; + }; +} |