flint: to finalAttrs, strictDeps, fix static build
This commit is contained in:
@@ -2,34 +2,45 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
gmp,
|
||||
mpfr,
|
||||
ntl,
|
||||
fetchpatch,
|
||||
windows,
|
||||
autoconf,
|
||||
automake,
|
||||
gettext,
|
||||
libtool,
|
||||
openblas ? null,
|
||||
gmp,
|
||||
mpfr,
|
||||
ntl,
|
||||
blas,
|
||||
lapack,
|
||||
boehmgc,
|
||||
openblas ? null,
|
||||
withBlas ? true,
|
||||
withNtl ? !ntl.meta.broken,
|
||||
withGc ? false,
|
||||
}:
|
||||
|
||||
assert
|
||||
withBlas
|
||||
-> openblas != null && blas.implementation == "openblas" && lapack.implementation == "openblas";
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "flint3";
|
||||
version = "3.3.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://flintlib.org/download/flint-${version}.tar.gz";
|
||||
url = "https://flintlib.org/download/flint-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-ZNcOUTB2z6lx4EELWMHaXTURKRPppWtE4saBtFnT6vs=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Remove once/if https://github.com/flintlib/flint/pull/2411 is merged
|
||||
# Required or else during the check phase the build fails while
|
||||
# linking a test due to duplicate symbol errors
|
||||
./checkPhase.patch
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
automake
|
||||
@@ -50,6 +61,9 @@ stdenv.mkDerivation rec {
|
||||
++ lib.optionals withNtl [
|
||||
ntl
|
||||
]
|
||||
++ lib.optionals withGc [
|
||||
boehmgc
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isMinGW [
|
||||
windows.pthreads
|
||||
];
|
||||
@@ -70,19 +84,22 @@ stdenv.mkDerivation rec {
|
||||
]
|
||||
++ lib.optionals withNtl [
|
||||
"--with-ntl=${ntl}"
|
||||
]
|
||||
++ lib.optionals withGc [
|
||||
"--with-gc=${boehmgc}"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
enableParallelChecking = true;
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Fast Library for Number Theory";
|
||||
license = licenses.lgpl3Plus;
|
||||
maintainers = with maintainers; [ smasher164 ];
|
||||
teams = [ teams.sage ];
|
||||
platforms = platforms.all;
|
||||
license = lib.licenses.lgpl3Plus;
|
||||
maintainers = [ lib.maintainers.smasher164 ];
|
||||
teams = [ lib.teams.sage ];
|
||||
platforms = lib.platforms.all;
|
||||
homepage = "https://www.flintlib.org/";
|
||||
downloadPage = "https://www.flintlib.org/downloads.html";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
https://github.com/flintlib/flint/pull/2411
|
||||
|
||||
From 9957b17e6b08bd57790f7da1344b4d92eefc0b38 Mon Sep 17 00:00:00 2001
|
||||
From: Ross Smyth <18294397+RossSmyth@users.noreply.github.com>
|
||||
Date: Sun, 21 Sep 2025 15:58:57 -0400
|
||||
Subject: [PATCH] Fix duplicate symbols linker error
|
||||
|
||||
When I run `make check` I get linker errors without
|
||||
this patch
|
||||
---
|
||||
src/double_interval.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/double_interval.h b/src/double_interval.h
|
||||
index a423257db2..5f685c283f 100644
|
||||
--- a/src/double_interval.h
|
||||
+++ b/src/double_interval.h
|
||||
@@ -13,7 +13,7 @@
|
||||
#define DOUBLE_INTERVAL_H
|
||||
|
||||
#ifdef DOUBLE_INTERVAL_INLINES_C
|
||||
-#define DOUBLE_INTERVAL_INLINE
|
||||
+#define DOUBLE_INTERVAL_INLINE static
|
||||
#else
|
||||
#define DOUBLE_INTERVAL_INLINE static inline
|
||||
#endif
|
||||
Reference in New Issue
Block a user