Merge pull request #278189 from smasher164/flint3
flint3: init at 3.0.1
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, gmp
|
||||
, mpfr
|
||||
, ntl
|
||||
, autoconf
|
||||
, automake
|
||||
, gettext
|
||||
, libtool
|
||||
, openblas ? null, blas, lapack
|
||||
, withBlas ? true
|
||||
, withNtl ? true
|
||||
}:
|
||||
|
||||
assert withBlas -> openblas != null && blas.implementation == "openblas" && lapack.implementation == "openblas";
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "flint3";
|
||||
version = "3.0.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.flintlib.org/flint-${version}.tar.gz";
|
||||
sha256 = "sha256-ezEaAFA6hjiB64F32+uEMi8pOZ89fXLzsaTJuh1XlLQ=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
autoconf
|
||||
automake
|
||||
gettext
|
||||
libtool
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gmp
|
||||
mpfr
|
||||
] ++ lib.optionals withBlas [
|
||||
openblas
|
||||
] ++ lib.optionals withNtl [
|
||||
ntl
|
||||
];
|
||||
|
||||
# We're not using autoreconfHook because flint's bootstrap
|
||||
# script calls autoreconf, among other things.
|
||||
preConfigurePhase = ''
|
||||
echo "Executing bootstrap.sh"
|
||||
./bootstrap.sh
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-gmp=${gmp}"
|
||||
"--with-mpfr=${mpfr}"
|
||||
] ++ lib.optionals withBlas [
|
||||
"--with-blas=${openblas}"
|
||||
] ++ lib.optionals withNtl [
|
||||
"--with-ntl=${ntl}"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fast Library for Number Theory";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ smasher164 ] ++ teams.sage.members;
|
||||
platforms = platforms.unix;
|
||||
homepage = "https://www.flintlib.org/";
|
||||
downloadPage = "https://www.flintlib.org/downloads.html";
|
||||
};
|
||||
}
|
||||
@@ -21263,6 +21263,8 @@ with pkgs;
|
||||
|
||||
flint = callPackage ../development/libraries/flint { };
|
||||
|
||||
flint3 = callPackage ../development/libraries/flint/3.nix { };
|
||||
|
||||
flite = callPackage ../development/libraries/flite { };
|
||||
|
||||
fltk13 = callPackage ../development/libraries/fltk {
|
||||
|
||||
Reference in New Issue
Block a user