2021-01-21 09:00:13 -08:00
|
|
|
{ lib, stdenv
|
2018-03-30 05:40:52 -07:00
|
|
|
, fetchurl
|
|
|
|
, gmp
|
|
|
|
, mpir
|
|
|
|
, mpfr
|
|
|
|
, ntl
|
2020-03-31 07:47:18 -07:00
|
|
|
, openblas ? null, blas, lapack
|
2018-03-30 05:40:52 -07:00
|
|
|
, withBlas ? true
|
|
|
|
}:
|
|
|
|
|
2020-03-31 07:47:18 -07:00
|
|
|
assert withBlas -> openblas != null && blas.implementation == "openblas" && lapack.implementation == "openblas";
|
2018-03-30 05:40:52 -07:00
|
|
|
|
2016-10-10 10:31:19 -07:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "flint";
|
2021-04-07 06:12:55 -07:00
|
|
|
version = "2.7.1";
|
2021-05-11 09:56:06 -07:00
|
|
|
|
2016-10-10 10:31:19 -07:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.flintlib.org/flint-${version}.tar.gz";
|
2021-04-07 06:12:55 -07:00
|
|
|
sha256 = "07j8r96kdzp19cy3a5yvpjxf90mkd6103yr2n42qmpv7mgcjyvhq";
|
2016-10-10 10:31:19 -07:00
|
|
|
};
|
2021-05-11 09:56:06 -07:00
|
|
|
|
2018-03-30 05:40:52 -07:00
|
|
|
buildInputs = [
|
|
|
|
gmp
|
|
|
|
mpir
|
|
|
|
mpfr
|
|
|
|
ntl
|
2021-01-21 09:00:13 -08:00
|
|
|
] ++ lib.optionals withBlas [
|
2018-03-30 05:40:52 -07:00
|
|
|
openblas
|
|
|
|
];
|
2018-04-11 04:52:10 -07:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
mpfr # flint.h includes mpfr.h
|
|
|
|
];
|
2018-03-30 05:40:52 -07:00
|
|
|
configureFlags = [
|
|
|
|
"--with-gmp=${gmp}"
|
|
|
|
"--with-mpir=${mpir}"
|
|
|
|
"--with-mpfr=${mpfr}"
|
|
|
|
"--with-ntl=${ntl}"
|
2021-01-21 09:00:13 -08:00
|
|
|
] ++ lib.optionals withBlas [
|
2018-03-30 05:40:52 -07:00
|
|
|
"--with-blas=${openblas}"
|
|
|
|
];
|
2018-07-08 14:07:41 -07:00
|
|
|
|
2018-03-30 05:40:52 -07:00
|
|
|
doCheck = true;
|
2016-10-10 10:31:19 -07:00
|
|
|
meta = {
|
|
|
|
inherit version;
|
2021-01-15 20:20:42 -08:00
|
|
|
description = "Fast Library for Number Theory";
|
2021-01-21 09:00:13 -08:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2021-04-19 18:44:54 -07:00
|
|
|
maintainers = lib.teams.sage.members;
|
2021-01-21 09:00:13 -08:00
|
|
|
platforms = lib.platforms.unix;
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "http://www.flintlib.org/";
|
2016-10-10 10:31:19 -07:00
|
|
|
downloadPage = "http://www.flintlib.org/downloads.html";
|
|
|
|
updateWalker = true;
|
|
|
|
};
|
|
|
|
}
|