depot/third_party/nixpkgs/pkgs/development/libraries/flint/default.nix
Default email a3bb8d7922 Project import generated by Copybara.
GitOrigin-RevId: 439b1605227b8adb1357b55ce8529d541abbe9eb
2021-08-06 00:33:18 +03:00

56 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.8.0";
src = fetchurl {
url = "https://www.flintlib.org/flint-${version}.tar.gz";
sha256 = "sha256-WEI1zcOdd52ZIOrvFv4ITzwm/+7qADo//2SiCg8zRJ4=";
};
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 = with lib; {
description = "Fast Library for Number Theory";
license = licenses.gpl2Plus;
maintainers = teams.sage.members;
platforms = platforms.unix;
homepage = "https://www.flintlib.org/";
downloadPage = "https://www.flintlib.org/downloads.html";
updateWalker = true;
};
}