Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 gfortran, 6 pkg-config, 7 libtool, 8 m4, 9 gnum4, 10 file, 11 # Memory Hierarchy (End-user can provide this.) 12 memHierarchy ? "", 13 # Headers/Libraries 14 blas, 15 zlib, 16 # RPC headers (rpc/xdr.h) 17 openmpi, 18 help2man, 19 doxygen, 20 octave, 21}: 22 23stdenv.mkDerivation rec { 24 pname = "librsb"; 25 version = "1.3.0.2"; 26 27 src = fetchurl { 28 url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz"; 29 sha256 = "sha256-GMb8RD+hz9KoEQ99S4jVu8tJO56Fs6YgFLi7V6hI4E8="; 30 }; 31 32 # The default configure flags are still present when building 33 # --disable-static --disable-dependency-tracking 34 # Along with the --prefix=... flag (but we want that one). 35 configureFlags = [ 36 "--enable-static" 37 "--enable-doc-build" 38 "--enable-octave-testing" 39 "--enable-sparse-blas-interface" 40 "--enable-fortran-module-install" 41 "--enable-pkg-config-install" 42 "--enable-matrix-types=all" 43 "--with-zlib=${zlib}/lib/libz.so" 44 "--with-memhinfo=${memHierarchy}" 45 ]; 46 47 # Ensure C/Fortran code is position-independent. 48 env.NIX_CFLAGS_COMPILE = toString [ 49 "-fPIC" 50 "-Ofast" 51 ]; 52 FCFLAGS = [ 53 "-fPIC" 54 "-Ofast" 55 ]; 56 57 enableParallelBuilding = true; 58 59 nativeBuildInputs = [ 60 gfortran 61 pkg-config 62 libtool 63 m4 64 gnum4 65 file 66 blas 67 zlib 68 openmpi 69 octave 70 help2man # Turn "--help" into a man-page 71 doxygen # Build documentation 72 ]; 73 74 # Need to run cleanall target to remove any previously-generated files. 75 preBuild = '' 76 make cleanall 77 ''; 78 79 nativeCheckInputs = [ 80 octave 81 ]; 82 checkTarget = "tests"; 83 84 meta = { 85 homepage = "https://librsb.sourceforge.net/"; 86 description = "Shared memory parallel sparse matrix and sparse BLAS library"; 87 longDescription = '' 88 Library for sparse matrix computations featuring the Recursive Sparse 89 Blocks (RSB) matrix format. This format allows cache efficient and 90 multi-threaded (that is, shared memory parallel) operations on large 91 sparse matrices. 92 librsb implements the Sparse BLAS standard, as specified in the BLAS 93 Forum documents. 94 Contains libraries and header files for developing applications that 95 want to make use of librsb. 96 ''; 97 license = with lib.licenses; [ lgpl3Plus ]; 98 maintainers = with lib.maintainers; [ KarlJoad ]; 99 platforms = lib.platforms.all; 100 # linking errors such as 'undefined reference to `gzungetc' 101 broken = true; 102 }; 103}