Merge pull request #45013 from jbaum98/fflas-ffpack_darwin
fflas-ffpack: Add darwin support
This commit is contained in:
commit
8014c7f186
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchFromGitHub, autoreconfHook, givaro, pkgconfig, openblas
|
{ stdenv, fetchFromGitHub, autoreconfHook, givaro, pkgconfig, blas
|
||||||
, gmpxx
|
, gmpxx
|
||||||
, optimize ? false # impure
|
, optimize ? false # impure
|
||||||
}:
|
}:
|
||||||
|
@ -6,23 +6,30 @@ stdenv.mkDerivation rec {
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
pname = "fflas-ffpack";
|
pname = "fflas-ffpack";
|
||||||
version = "2.3.2";
|
version = "2.3.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "linbox-team";
|
owner = "linbox-team";
|
||||||
repo = "${pname}";
|
repo = "${pname}";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1cqhassj2dny3gx0iywvmnpq8ca0d6m82xl5rz4mb8gaxr2kwddl";
|
sha256 = "1cqhassj2dny3gx0iywvmnpq8ca0d6m82xl5rz4mb8gaxr2kwddl";
|
||||||
};
|
};
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
gmpxx
|
gmpxx
|
||||||
];
|
];
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
autoreconfHook
|
autoreconfHook
|
||||||
pkgconfig
|
pkgconfig
|
||||||
] ++ stdenv.lib.optionals doCheck checkInputs;
|
] ++ stdenv.lib.optionals doCheck checkInputs;
|
||||||
buildInputs = [ givaro openblas];
|
|
||||||
|
buildInputs = [ givaro blas ];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-blas-libs=-lopenblas"
|
"--with-blas-libs=-l${blas.linkName}"
|
||||||
"--with-lapack-libs=-lopenblas"
|
"--with-lapack-libs=-l${blas.linkName}"
|
||||||
] ++ stdenv.lib.optionals (!optimize) [
|
] ++ stdenv.lib.optionals (!optimize) [
|
||||||
# disable SIMD instructions (which are enabled *when available* by default)
|
# disable SIMD instructions (which are enabled *when available* by default)
|
||||||
"--disable-sse"
|
"--disable-sse"
|
||||||
|
@ -36,13 +43,15 @@ stdenv.mkDerivation rec {
|
||||||
"--disable-fma"
|
"--disable-fma"
|
||||||
"--disable-fma4"
|
"--disable-fma4"
|
||||||
];
|
];
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
inherit version;
|
inherit version;
|
||||||
description = ''Finite Field Linear Algebra Subroutines'';
|
description = ''Finite Field Linear Algebra Subroutines'';
|
||||||
license = stdenv.lib.licenses.lgpl21Plus;
|
license = stdenv.lib.licenses.lgpl21Plus;
|
||||||
maintainers = [stdenv.lib.maintainers.raskin];
|
maintainers = [stdenv.lib.maintainers.raskin];
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = stdenv.lib.platforms.unix;
|
||||||
homepage = https://linbox-team.github.io/fflas-ffpack/;
|
homepage = https://linbox-team.github.io/fflas-ffpack/;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,4 +59,10 @@ stdenv.mkDerivation rec {
|
||||||
homepage = http://www.netlib.org/blas/;
|
homepage = http://www.netlib.org/blas/;
|
||||||
platforms = stdenv.lib.platforms.unix;
|
platforms = stdenv.lib.platforms.unix;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# We use linkName to pass a different name to --with-blas-libs for
|
||||||
|
# fflas-ffpack and linbox, because we use blas on darwin but openblas
|
||||||
|
# elsewhere.
|
||||||
|
# See see https://github.com/NixOS/nixpkgs/pull/45013.
|
||||||
|
passthru.linkName = "blas";
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,4 +143,10 @@ stdenv.mkDerivation rec {
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
maintainers = with maintainers; [ ttuegel ];
|
maintainers = with maintainers; [ ttuegel ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# We use linkName to pass a different name to --with-blas-libs for
|
||||||
|
# fflas-ffpack and linbox, because we use blas on darwin but openblas
|
||||||
|
# elsewhere.
|
||||||
|
# See see https://github.com/NixOS/nixpkgs/pull/45013.
|
||||||
|
passthru.linkName = "openblas";
|
||||||
}
|
}
|
||||||
|
|
|
@ -9195,7 +9195,12 @@ with pkgs;
|
||||||
|
|
||||||
ffcast = callPackage ../tools/X11/ffcast { };
|
ffcast = callPackage ../tools/X11/ffcast { };
|
||||||
|
|
||||||
fflas-ffpack = callPackage ../development/libraries/fflas-ffpack {};
|
fflas-ffpack = callPackage ../development/libraries/fflas-ffpack {
|
||||||
|
# We need to use blas instead of openblas on darwin,
|
||||||
|
# see https://github.com/NixOS/nixpkgs/pull/45013.
|
||||||
|
blas = if stdenv.isDarwin then blas else openblas;
|
||||||
|
};
|
||||||
|
|
||||||
fflas-ffpack_1 = callPackage ../development/libraries/fflas-ffpack/1.nix {};
|
fflas-ffpack_1 = callPackage ../development/libraries/fflas-ffpack/1.nix {};
|
||||||
linbox = callPackage ../development/libraries/linbox {};
|
linbox = callPackage ../development/libraries/linbox {};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue