2021-03-12 07:09:13 +00:00
|
|
|
{ lib, stdenv, fetchurl
|
|
|
|
, gfortran
|
|
|
|
, pkg-config, libtool
|
|
|
|
, m4, gnum4
|
|
|
|
, file
|
|
|
|
# Memory Hierarchy (End-user can provide this.)
|
|
|
|
, memHierarchy ? ""
|
|
|
|
# Headers/Libraries
|
|
|
|
, blas, zlib
|
|
|
|
# RPC headers (rpc/xdr.h)
|
|
|
|
, openmpi
|
|
|
|
, help2man
|
|
|
|
, doxygen
|
|
|
|
, octave
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "librsb";
|
2022-03-05 16:20:37 +00:00
|
|
|
version = "1.2.0.10";
|
2021-03-12 07:09:13 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
|
2022-03-05 16:20:37 +00:00
|
|
|
sha256 = "sha256-7Enz94p8Q/yeEJdlk9EAqkmxhjMJ7Y+jzLt6rVLS97g=";
|
2021-03-12 07:09:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# The default configure flags are still present when building
|
|
|
|
# --disable-static --disable-dependency-tracking
|
|
|
|
# Along with the --prefix=... flag (but we want that one).
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-static"
|
|
|
|
"--enable-doc-build"
|
|
|
|
"--enable-octave-testing"
|
|
|
|
"--enable-sparse-blas-interface"
|
|
|
|
"--enable-fortran-module-install"
|
|
|
|
"--enable-pkg-config-install"
|
|
|
|
"--enable-matrix-types=all"
|
|
|
|
"--with-zlib=${zlib}/lib/libz.so"
|
|
|
|
"--with-memhinfo=${memHierarchy}"
|
|
|
|
];
|
|
|
|
|
|
|
|
# Ensure C/Fortran code is position-independent.
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [ "-fPIC" "-Ofast" ];
|
2021-03-12 07:09:13 +00:00
|
|
|
FCFLAGS = [ "-fPIC" "-Ofast" ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
gfortran
|
|
|
|
pkg-config libtool
|
|
|
|
m4 gnum4
|
|
|
|
file
|
|
|
|
blas zlib
|
|
|
|
openmpi
|
|
|
|
octave
|
|
|
|
help2man # Turn "--help" into a man-page
|
|
|
|
doxygen # Build documentation
|
|
|
|
];
|
|
|
|
|
|
|
|
# Need to run cleanall target to remove any previously-generated files.
|
|
|
|
preBuild = ''
|
|
|
|
make cleanall
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-03-12 07:09:13 +00:00
|
|
|
octave
|
|
|
|
];
|
|
|
|
checkTarget = "tests";
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://librsb.sourceforge.net/";
|
2021-03-12 07:09:13 +00:00
|
|
|
description = "Shared memory parallel sparse matrix and sparse BLAS library";
|
|
|
|
longDescription = ''
|
|
|
|
Library for sparse matrix computations featuring the Recursive Sparse
|
|
|
|
Blocks (RSB) matrix format. This format allows cache efficient and
|
|
|
|
multi-threaded (that is, shared memory parallel) operations on large
|
|
|
|
sparse matrices.
|
|
|
|
librsb implements the Sparse BLAS standard, as specified in the BLAS
|
|
|
|
Forum documents.
|
|
|
|
Contains libraries and header files for developing applications that
|
|
|
|
want to make use of librsb.
|
|
|
|
'';
|
|
|
|
license = with licenses; [ lgpl3Plus ];
|
|
|
|
maintainers = with maintainers; [ KarlJoad ];
|
|
|
|
platforms = platforms.all;
|
2021-12-30 13:39:12 +00:00
|
|
|
# ./rsb_common.h:56:10: fatal error: 'omp.h' file not found
|
|
|
|
broken = stdenv.isDarwin;
|
2021-03-12 07:09:13 +00:00
|
|
|
};
|
|
|
|
}
|