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

55 lines
1.2 KiB
Nix
Raw Normal View History

{ 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";
2021-04-07 13:12:55 +00:00
version = "2.7.1";
2016-10-10 17:31:19 +00:00
src = fetchurl {
url = "http://www.flintlib.org/flint-${version}.tar.gz";
2021-04-07 13:12:55 +00:00
sha256 = "07j8r96kdzp19cy3a5yvpjxf90mkd6103yr2n42qmpv7mgcjyvhq";
2016-10-10 17:31:19 +00:00
};
buildInputs = [
gmp
mpir
mpfr
ntl
] ++ lib.optionals withBlas [
openblas
];
2018-04-11 11:52:10 +00:00
propagatedBuildInputs = [
mpfr # flint.h includes mpfr.h
];
configureFlags = [
"--with-gmp=${gmp}"
"--with-mpir=${mpir}"
"--with-mpfr=${mpfr}"
"--with-ntl=${ntl}"
] ++ lib.optionals withBlas [
"--with-blas=${openblas}"
];
# issues with ntl -- https://github.com/wbhart/flint2/issues/487
2019-12-31 00:00:46 +00:00
NIX_CXXSTDLIB_COMPILE = "-std=c++11";
doCheck = true;
2016-10-10 17:31:19 +00:00
meta = {
inherit version;
description = "Fast Library for Number Theory";
license = lib.licenses.gpl2Plus;
2021-04-20 01:44:54 +00:00
maintainers = lib.teams.sage.members;
platforms = lib.platforms.unix;
homepage = "http://www.flintlib.org/";
2016-10-10 17:31:19 +00:00
downloadPage = "http://www.flintlib.org/downloads.html";
updateWalker = true;
};
}