flint: Always create proper so file, support blas
This commit is contained in:
parent
90cfaf1ab3
commit
d836d320da
@ -1,14 +1,48 @@
|
|||||||
{stdenv, fetchurl, gmp, mpir, mpfr, openblas, ntl}:
|
{ stdenv
|
||||||
|
, fetchurl
|
||||||
|
, fetchpatch
|
||||||
|
, gmp
|
||||||
|
, mpir
|
||||||
|
, mpfr
|
||||||
|
, ntl
|
||||||
|
, openblas ? null
|
||||||
|
, withBlas ? true
|
||||||
|
}:
|
||||||
|
|
||||||
|
assert withBlas -> openblas != null;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "flint-${version}";
|
name = "flint-${version}";
|
||||||
version = "2.5.2";
|
version = "2.5.2"; # remove libflint.so.MAJOR patch when updating
|
||||||
# or fetchFromGitHub(owner,repo,rev) or fetchgit(rev)
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://www.flintlib.org/flint-${version}.tar.gz";
|
url = "http://www.flintlib.org/flint-${version}.tar.gz";
|
||||||
sha256 = "11syazv1a8rrnac3wj3hnyhhflpqcmq02q8pqk2m6g2k6h0gxwfb";
|
sha256 = "11syazv1a8rrnac3wj3hnyhhflpqcmq02q8pqk2m6g2k6h0gxwfb";
|
||||||
};
|
};
|
||||||
buildInputs = [gmp mpir mpfr openblas ntl];
|
buildInputs = [
|
||||||
configureFlags = "--with-gmp=${gmp} --with-mpir=${mpir} --with-mpfr=${mpfr} --with-blas=${openblas} --with-ntl=${ntl}";
|
gmp
|
||||||
|
mpir
|
||||||
|
mpfr
|
||||||
|
ntl
|
||||||
|
] ++ stdenv.lib.optionals withBlas [
|
||||||
|
openblas
|
||||||
|
];
|
||||||
|
configureFlags = [
|
||||||
|
"--with-gmp=${gmp}"
|
||||||
|
"--with-mpir=${mpir}"
|
||||||
|
"--with-mpfr=${mpfr}"
|
||||||
|
"--with-ntl=${ntl}"
|
||||||
|
] ++ stdenv.lib.optionals withBlas [
|
||||||
|
"--with-blas=${openblas}"
|
||||||
|
];
|
||||||
|
patches = [
|
||||||
|
(fetchpatch {
|
||||||
|
# Always produce libflint.so.MAJOR; will be included in the next flint version
|
||||||
|
# See https://github.com/wbhart/flint2/pull/347
|
||||||
|
url = "https://github.com/wbhart/flint2/commit/49fbcd8f736f847d3f9667f9f7d5567ef4550ecb.patch";
|
||||||
|
sha256 = "09w09bpq85kjf752bd3y3i5lvy59b8xjiy7qmrcxzibx2a21pj73";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
doCheck = true;
|
||||||
meta = {
|
meta = {
|
||||||
inherit version;
|
inherit version;
|
||||||
description = ''Fast Library for Number Theory'';
|
description = ''Fast Library for Number Theory'';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user