2018-03-07 23:14:05 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, givaro
|
|
|
|
, pkgconfig
|
2018-08-18 21:54:22 +01:00
|
|
|
, blas
|
2020-03-27 18:50:45 +00:00
|
|
|
, lapack
|
2018-03-07 23:14:05 +00:00
|
|
|
, fflas-ffpack
|
|
|
|
, gmpxx
|
|
|
|
, withSage ? false # sage support
|
|
|
|
}:
|
2020-03-27 18:50:45 +00:00
|
|
|
|
2020-04-20 21:50:55 +01:00
|
|
|
assert (!blas.isILP64) && (!lapack.isILP64);
|
2020-03-27 18:50:45 +00:00
|
|
|
|
2018-03-07 23:14:05 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "linbox";
|
2019-06-17 21:08:03 +01:00
|
|
|
version = "1.6.3";
|
2019-05-15 08:55:40 +01:00
|
|
|
|
2018-03-07 23:14:05 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linbox-team";
|
2019-09-09 00:38:31 +01:00
|
|
|
repo = pname;
|
2018-03-07 23:14:05 +00:00
|
|
|
rev = "v${version}";
|
2019-06-17 21:08:03 +01:00
|
|
|
sha256 = "10j6dspbsq7d2l4q3y0c1l1xwmaqqba2fxg59q5bhgk9h5d7q571";
|
2018-03-07 23:14:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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 = [
|
2020-03-27 18:50:45 +00:00
|
|
|
"--with-blas-libs=-lblas"
|
2018-03-07 23:14:05 +00:00
|
|
|
"--disable-optimization"
|
2019-04-21 18:06:50 +01:00
|
|
|
] ++ stdenv.lib.optionals stdenv.isx86_64 {
|
2018-03-07 23:14:05 +00:00
|
|
|
# disable SIMD instructions (which are enabled *when available* by default)
|
2019-08-13 22:52:01 +01:00
|
|
|
default = [ "--disable-sse3" "--disable-ssse3" "--disable-sse41" "--disable-sse42" "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
|
|
|
|
westmere = [ "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
|
|
|
|
sandybridge = [ "--disable-avx2" "--disable-fma" "--disable-fma4" ];
|
|
|
|
ivybridge = [ "--disable-avx2" "--disable-fma" "--disable-fma4" ];
|
|
|
|
haswell = [ "--disable-fma4" ];
|
|
|
|
broadwell = [ "--disable-fma4" ];
|
|
|
|
skylake = [ "--disable-fma4" ];
|
|
|
|
skylake-avx512 = [ "--disable-fma4" ];
|
2019-04-21 18:06:50 +01:00
|
|
|
}.${stdenv.hostPlatform.platform.gcc.arch or "default"}
|
|
|
|
++ stdenv.lib.optionals withSage [
|
2018-03-07 23:14:05 +00:00
|
|
|
"--enable-sage"
|
|
|
|
];
|
|
|
|
|
|
|
|
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;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://linalg.org/";
|
2018-03-07 23:14:05 +00:00
|
|
|
};
|
|
|
|
}
|