10 , withSage ? false # sage support
13 assert (!blas.isILP64) && (!lapack.isILP64);
15 stdenv.mkDerivation rec {
19 src = fetchFromGitHub {
20 owner = "linbox-team";
23 sha256 = "sha256-mW84a98KPLqcHMjX3LIYTmVe0ngUdz6RJLpoDaAqKU8=";
39 "--with-blas-libs=-lblas"
40 "--disable-optimization"
41 ] ++ lib.optionals stdenv.isx86_64 [
42 # disable SIMD instructions (which are enabled *when available* by default)
43 "--${if stdenv.hostPlatform.sse3Support then "enable" else "disable"}-sse3"
44 "--${if stdenv.hostPlatform.ssse3Support then "enable" else "disable"}-ssse3"
45 "--${if stdenv.hostPlatform.sse4_1Support then "enable" else "disable"}-sse41"
46 "--${if stdenv.hostPlatform.sse4_2Support then "enable" else "disable"}-sse42"
47 "--${if stdenv.hostPlatform.avxSupport then "enable" else "disable"}-avx"
48 "--${if stdenv.hostPlatform.avx2Support then "enable" else "disable"}-avx2"
49 "--${if stdenv.hostPlatform.fmaSupport then "enable" else "disable"}-fma"
50 "--${if stdenv.hostPlatform.fma4Support then "enable" else "disable"}-fma4"
51 ] ++ lib.optionals withSage [
55 # https://github.com/linbox-team/linbox/issues/304
56 hardeningDisable = [ "fortify3" ];
60 enableParallelBuilding = true;
63 description = "C++ library for exact, high-performance linear algebra";
64 license = licenses.lgpl21Plus;
65 maintainers = teams.sage.members;
66 platforms = platforms.unix;
67 homepage = "https://linalg.org/";