nixpkgs/pkgs/development/libraries/flint/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
1.1 KiB
Nix
Raw Normal View History

2021-07-25 22:59:36 +00:00
{ lib
, stdenv
, fetchurl
, gmp
, mpir
, mpfr
, ntl
, openblas ? null, blas, lapack
, withBlas ? true
}:
assert withBlas -> openblas != null && blas.implementation == "openblas" && lapack.implementation == "openblas";
2016-10-10 17:31:19 +00:00
stdenv.mkDerivation rec {
pname = "flint";
2022-06-25 17:25:33 +00:00
version = "2.9.0";
2021-05-11 16:56:06 +00:00
2016-10-10 17:31:19 +00:00
src = fetchurl {
2021-07-25 22:59:36 +00:00
url = "https://www.flintlib.org/flint-${version}.tar.gz";
2022-06-25 17:25:33 +00:00
sha256 = "sha256-L8CQ1RAzyTII5sENQGOXpTyYOuU0O5WOsl9ypXpM52o=";
2016-10-10 17:31:19 +00:00
};
2021-05-11 16:56:06 +00:00
buildInputs = [
gmp
mpir
mpfr
ntl
] ++ lib.optionals withBlas [
openblas
];
2021-07-25 22:59:36 +00:00
2018-04-11 11:52:10 +00:00
propagatedBuildInputs = [
mpfr # flint.h includes mpfr.h
];
2021-07-25 22:59:36 +00:00
configureFlags = [
"--with-gmp=${gmp}"
"--with-mpir=${mpir}"
"--with-mpfr=${mpfr}"
"--with-ntl=${ntl}"
] ++ lib.optionals withBlas [
"--with-blas=${openblas}"
];
enableParallelBuilding = true;
doCheck = true;
2021-07-25 22:59:36 +00:00
meta = with lib; {
description = "Fast Library for Number Theory";
2021-07-25 22:59:36 +00:00
license = licenses.gpl2Plus;
maintainers = teams.sage.members;
platforms = platforms.unix;
homepage = "https://www.flintlib.org/";
downloadPage = "https://www.flintlib.org/downloads.html";
2016-10-10 17:31:19 +00:00
};
}