evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / ff / fflas-ffpack / package.nix
blob1d8c87ba45d1a08e4fe7150c65784d1b89c3b76f
1 { lib, stdenv, fetchFromGitHub, autoreconfHook, givaro, pkg-config, blas, lapack
2 , gmpxx
3 }:
5 assert (!blas.isILP64) && (!lapack.isILP64);
7 stdenv.mkDerivation rec {
8   pname = "fflas-ffpack";
9   version = "2.5.0";
11   src = fetchFromGitHub {
12     owner = "linbox-team";
13     repo = pname;
14     rev = "v${version}";
15     sha256 = "sha256-Eztc2jUyKRVUiZkYEh+IFHkDuPIy+Gx3ZW/MsuOVaMc=";
16   };
18   nativeCheckInputs = [
19     gmpxx
20   ];
22   enableParallelBuilding = true;
24   nativeBuildInputs = [
25     autoreconfHook
26     pkg-config
27   ] ++ lib.optionals doCheck nativeCheckInputs;
29   buildInputs = [ givaro blas lapack ];
31   configureFlags = [
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"
49   ];
50   doCheck = true;
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   };