From 56189df7452e9a6446c80678ae7fae5de7d423ad Mon Sep 17 00:00:00 2001 From: Akhil Indurti Date: Mon, 1 Jan 2024 19:10:33 -0800 Subject: [PATCH 1/2] flint3: init at 3.0.1 --- pkgs/development/libraries/flint/3.nix | 71 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 73 insertions(+) create mode 100644 pkgs/development/libraries/flint/3.nix diff --git a/pkgs/development/libraries/flint/3.nix b/pkgs/development/libraries/flint/3.nix new file mode 100644 index 000000000000..99b7942973aa --- /dev/null +++ b/pkgs/development/libraries/flint/3.nix @@ -0,0 +1,71 @@ +{ lib +, stdenv +, fetchurl +, gmp +, mpfr +, ntl +, autoconf +, automake +, gettext +, libtool +, openblas ? null, blas, lapack +, withBlas ? true +, withNtl ? true +}: + +assert withBlas -> openblas != null && blas.implementation == "openblas" && lapack.implementation == "openblas"; + +stdenv.mkDerivation rec { + pname = "flint3"; + version = "3.0.1"; + + src = fetchurl { + url = "https://www.flintlib.org/flint-${version}.tar.gz"; + sha256 = "sha256-ezEaAFA6hjiB64F32+uEMi8pOZ89fXLzsaTJuh1XlLQ="; + }; + + propagatedBuildInputs = [ + autoconf + automake + gettext + libtool + ]; + + buildInputs = [ + gmp + mpfr + ] ++ lib.optionals withBlas [ + openblas + ] ++ lib.optionals withNtl [ + ntl + ]; + + # We're not using autoreconfHook because flint's bootstrap + # script calls autoreconf, among other things. + preConfigurePhase = '' + echo "Executing bootstrap.sh" + ./bootstrap.sh + ''; + + configureFlags = [ + "--with-gmp=${gmp}" + "--with-mpfr=${mpfr}" + ] ++ lib.optionals withBlas [ + "--with-blas=${openblas}" + ] ++ lib.optionals withNtl [ + "--with-ntl=${ntl}" + ]; + + enableParallelBuilding = true; + + 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"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d4778d42ec69..d4fe5a11f1cf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21279,6 +21279,8 @@ with pkgs; flint = callPackage ../development/libraries/flint { }; + flint3 = callPackage ../development/libraries/flint/3.nix { }; + flite = callPackage ../development/libraries/flite { }; fltk13 = callPackage ../development/libraries/fltk { From e40cd6b68def367ef1cf2d443954b4c648c4dc5b Mon Sep 17 00:00:00 2001 From: Akhil Indurti Date: Tue, 2 Jan 2024 02:02:13 -0800 Subject: [PATCH 2/2] maintainers: add smasher164 and sage team --- pkgs/development/libraries/flint/3.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/flint/3.nix b/pkgs/development/libraries/flint/3.nix index 99b7942973aa..3be7fdc63904 100644 --- a/pkgs/development/libraries/flint/3.nix +++ b/pkgs/development/libraries/flint/3.nix @@ -63,7 +63,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Fast Library for Number Theory"; license = licenses.gpl2Plus; - maintainers = teams.sage.members; + maintainers = with maintainers; [ smasher164 ] ++ teams.sage.members; platforms = platforms.unix; homepage = "https://www.flintlib.org/"; downloadPage = "https://www.flintlib.org/downloads.html";