Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 60 lines 2.2 kB view raw
1{ lib, stdenv, fetchFromGitHub, autoreconfHook, givaro, pkg-config, blas, lapack 2, gmpxx 3}: 4 5assert (!blas.isILP64) && (!lapack.isILP64); 6 7stdenv.mkDerivation rec { 8 pname = "fflas-ffpack"; 9 version = "2.5.0"; 10 11 src = fetchFromGitHub { 12 owner = "linbox-team"; 13 repo = pname; 14 rev = "v${version}"; 15 sha256 = "sha256-Eztc2jUyKRVUiZkYEh+IFHkDuPIy+Gx3ZW/MsuOVaMc="; 16 }; 17 18 nativeCheckInputs = [ 19 gmpxx 20 ]; 21 22 enableParallelBuilding = true; 23 24 nativeBuildInputs = [ 25 autoreconfHook 26 pkg-config 27 ] ++ lib.optionals doCheck nativeCheckInputs; 28 29 buildInputs = [ givaro blas lapack ]; 30 31 configureFlags = [ 32 "--with-blas-libs=-lcblas" 33 "--with-lapack-libs=-llapacke" 34 "--without-archnative" 35 ] ++ lib.optionals stdenv.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" 49 ]; 50 doCheck = true; 51 52 meta = with lib; { 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/"; 59 }; 60}