@@ -0,0 +1,41 @@
1+{ stdenv, fetchFromGitHub, gfortran, suitesparse, openblas }:
2+let
3+ suitesparse_ = suitesparse;
4+in let
5+ # SuiteSparse must use the same openblas
6+ suitesparse = suitesparse_.override { inherit openblas; };
7+in stdenv.mkDerivation rec {
8+
9+ name = "${pname}-${version}";
10+ pname = "cholmod-extra";
11+ version = "1.2.0";
12+
13+ src = fetchFromGitHub {
14+ repo = pname;
15+ owner = "jluttine";
16+ rev = version;
17+ sha256 = "0hz1lfp0zaarvl0dv0zgp337hyd8np41kmdpz5rr3fc6yzw7vmkg";
18+ };
19+
20+ buildInputs = [ suitesparse gfortran openblas ];
21+
22+ buildFlags = [
23+ "BLAS=-lopenblas"
24+ ];
25+
26+ installFlags = [
27+ "INSTALL_LIB=$(out)/lib"
28+ "INSTALL_INCLUDE=$(out)/include"
29+ ];
30+
31+ doCheck = true;
32+
33+ meta = with stdenv.lib; {
34+ homepage = https://github.com/jluttine/cholmod-extra;
35+ description = "A set of additional routines for SuiteSparse CHOLMOD Module";
36+ license = with licenses; [ gpl2Plus ];
37+ maintainers = with maintainers; [ jluttine ];
38+ platforms = with platforms; unix;
39+ };
40+
41+}