forked from mirrors/nixpkgs
Merge pull request #98485 from doronbehar/pkg/suitesparse
suitesparse: 5.7.2 -> 5.8.1
This commit is contained in:
commit
4a5e1fbc8e
|
@ -4,14 +4,15 @@
|
||||||
, blas, lapack
|
, blas, lapack
|
||||||
, metis
|
, metis
|
||||||
, fixDarwinDylibNames
|
, fixDarwinDylibNames
|
||||||
, gnum4
|
, gmp
|
||||||
|
, mpfr
|
||||||
, enableCuda ? false
|
, enableCuda ? false
|
||||||
, cudatoolkit
|
, cudatoolkit
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "suitesparse";
|
pname = "suitesparse";
|
||||||
version = "5.7.2";
|
version = "5.8.1";
|
||||||
|
|
||||||
outputs = [ "out" "dev" "doc" ];
|
outputs = [ "out" "dev" "doc" ];
|
||||||
|
|
||||||
|
@ -19,17 +20,19 @@ stdenv.mkDerivation rec {
|
||||||
owner = "DrTimothyAldenDavis";
|
owner = "DrTimothyAldenDavis";
|
||||||
repo = "SuiteSparse";
|
repo = "SuiteSparse";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1imndff7yygjrbbrcscsmirdi8w0lkwj5dbhydxmf7lklwn4j3q6";
|
sha256 = "0qjlyfxs8s48rs63c2fzspisgq1kk4bwkgnhmh125hgkdhrq2w1c";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
gnum4
|
|
||||||
] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
||||||
|
|
||||||
buildInputs = [
|
# Use compatible indexing for lapack and blas used
|
||||||
|
buildInputs = assert (blas.isILP64 == lapack.isILP64); [
|
||||||
blas lapack
|
blas lapack
|
||||||
metis
|
metis
|
||||||
gfortran.cc.lib
|
gfortran.cc.lib
|
||||||
|
gmp
|
||||||
|
mpfr
|
||||||
] ++ stdenv.lib.optional enableCuda cudatoolkit;
|
] ++ stdenv.lib.optional enableCuda cudatoolkit;
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
|
@ -41,8 +44,6 @@ stdenv.mkDerivation rec {
|
||||||
"INSTALL=${placeholder "out"}"
|
"INSTALL=${placeholder "out"}"
|
||||||
"INSTALL_INCLUDE=${placeholder "dev"}/include"
|
"INSTALL_INCLUDE=${placeholder "dev"}/include"
|
||||||
"JOBS=$(NIX_BUILD_CORES)"
|
"JOBS=$(NIX_BUILD_CORES)"
|
||||||
"BLAS=-lblas"
|
|
||||||
"LAPACK=-llapack"
|
|
||||||
"MY_METIS_LIB=-lmetis"
|
"MY_METIS_LIB=-lmetis"
|
||||||
] ++ stdenv.lib.optionals blas.isILP64 [
|
] ++ stdenv.lib.optionals blas.isILP64 [
|
||||||
"CFLAGS=-DBLAS64"
|
"CFLAGS=-DBLAS64"
|
||||||
|
@ -50,7 +51,13 @@ stdenv.mkDerivation rec {
|
||||||
"CUDA_PATH=${cudatoolkit}"
|
"CUDA_PATH=${cudatoolkit}"
|
||||||
"CUDART_LIB=${cudatoolkit.lib}/lib/libcudart.so"
|
"CUDART_LIB=${cudatoolkit.lib}/lib/libcudart.so"
|
||||||
"CUBLAS_LIB=${cudatoolkit}/lib/libcublas.so"
|
"CUBLAS_LIB=${cudatoolkit}/lib/libcublas.so"
|
||||||
];
|
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
||||||
|
# Unless these are set, the build will attempt to use `Accelerate` on darwin, see:
|
||||||
|
# https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/v5.8.1/SuiteSparse_config/SuiteSparse_config.mk#L368
|
||||||
|
"BLAS=-lblas"
|
||||||
|
"LAPACK=-llapack"
|
||||||
|
]
|
||||||
|
;
|
||||||
|
|
||||||
buildFlags = [
|
buildFlags = [
|
||||||
# Build individual shared libraries, not demos
|
# Build individual shared libraries, not demos
|
||||||
|
|
Loading…
Reference in a new issue