3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/linbox/default.nix

79 lines
1.8 KiB
Nix
Raw Normal View History

2018-03-07 23:14:05 +00:00
{ stdenv
, fetchFromGitHub
, fetchpatch
, autoreconfHook
, givaro
, pkgconfig
2018-08-18 21:54:22 +01:00
, blas
2018-03-07 23:14:05 +00:00
, 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
2018-08-18 21:54:22 +01:00
blas
2018-03-07 23:14:05 +00:00
gmpxx
fflas-ffpack
];
configureFlags = [
2018-08-18 21:54:22 +01:00
"--with-blas-libs=-l${blas.linkName}"
2018-03-07 23:14:05 +00:00
"--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;
2018-08-18 21:54:22 +01:00
enableParallelBuilding = true;
2018-03-07 23:14:05 +00:00
meta = {
inherit version;
description = "C++ library for exact, high-performance linear algebra";
license = stdenv.lib.licenses.lgpl21Plus;
maintainers = [stdenv.lib.maintainers.timokau];
2018-08-18 21:54:22 +01:00
platforms = stdenv.lib.platforms.unix;
2018-03-07 23:14:05 +00:00
homepage = http://linalg.org/;
};
}