depot/third_party/nixpkgs/pkgs/development/libraries/flint/default.nix
Default email 3e2acf8aff Project import generated by Copybara.
GitOrigin-RevId: d42cd445dde587e9a993cd9434cb43da07c4c5de
2021-05-20 18:08:51 -05:00

53 lines
1.1 KiB
Nix

{ lib, stdenv
, fetchurl
, gmp
, mpir
, mpfr
, ntl
, openblas ? null, blas, lapack
, withBlas ? true
}:
assert withBlas -> openblas != null && blas.implementation == "openblas" && lapack.implementation == "openblas";
stdenv.mkDerivation rec {
pname = "flint";
version = "2.7.1";
src = fetchurl {
url = "http://www.flintlib.org/flint-${version}.tar.gz";
sha256 = "07j8r96kdzp19cy3a5yvpjxf90mkd6103yr2n42qmpv7mgcjyvhq";
};
buildInputs = [
gmp
mpir
mpfr
ntl
] ++ lib.optionals withBlas [
openblas
];
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}"
];
doCheck = true;
meta = {
inherit version;
description = "Fast Library for Number Theory";
license = lib.licenses.gpl2Plus;
maintainers = lib.teams.sage.members;
platforms = lib.platforms.unix;
homepage = "http://www.flintlib.org/";
downloadPage = "http://www.flintlib.org/downloads.html";
updateWalker = true;
};
}