1 { lib, stdenv, fetchFromGitHub, autoreconfHook, givaro, pkg-config, blas, lapack
5 assert (!blas.isILP64) && (!lapack.isILP64);
7 stdenv.mkDerivation rec {
8 pname = "fflas-ffpack";
11 src = fetchFromGitHub {
12 owner = "linbox-team";
15 sha256 = "sha256-Eztc2jUyKRVUiZkYEh+IFHkDuPIy+Gx3ZW/MsuOVaMc=";
22 enableParallelBuilding = true;
27 ] ++ lib.optionals doCheck nativeCheckInputs;
29 buildInputs = [ givaro blas lapack ];
32 "--with-blas-libs=-lcblas"
33 "--with-lapack-libs=-llapacke"
34 "--without-archnative"
35 ] ++ lib.optionals stdenv.hostPlatform.isx86_64 [
36 # disable SIMD instructions (which are enabled *when available* by default)
37 # for now we need to be careful to disable *all* relevant versions of an instruction set explicitly (https://github.com/linbox-team/fflas-ffpack/issues/284)
38 "--${if stdenv.hostPlatform.sse3Support then "enable" else "disable"}-sse3"
39 "--${if stdenv.hostPlatform.ssse3Support then "enable" else "disable"}-ssse3"
40 "--${if stdenv.hostPlatform.sse4_1Support then "enable" else "disable"}-sse41"
41 "--${if stdenv.hostPlatform.sse4_2Support then "enable" else "disable"}-sse42"
42 "--${if stdenv.hostPlatform.avxSupport then "enable" else "disable"}-avx"
43 "--${if stdenv.hostPlatform.avx2Support then "enable" else "disable"}-avx2"
44 "--${if stdenv.hostPlatform.avx512Support then "enable" else "disable"}-avx512f"
45 "--${if stdenv.hostPlatform.avx512Support then "enable" else "disable"}-avx512dq"
46 "--${if stdenv.hostPlatform.avx512Support then "enable" else "disable"}-avx512vl"
47 "--${if stdenv.hostPlatform.fmaSupport then "enable" else "disable"}-fma"
48 "--${if stdenv.hostPlatform.fma4Support then "enable" else "disable"}-fma4"
53 description = "Finite Field Linear Algebra Subroutines";
54 mainProgram = "fflas-ffpack-config";
55 license = licenses.lgpl21Plus;
56 maintainers = teams.sage.members;
57 platforms = platforms.unix;
58 homepage = "https://linbox-team.github.io/fflas-ffpack/";