blob: f1e851ef444d0615e2c9e6a1fb2cc57df658f739 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
{ lib
, stdenv
, fetchFromGitHub
, cmake
, blas
, llvmPackages
}:
let
suitesparseVersion = "7.7.0";
in
stdenv.mkDerivation {
pname = "mongoose";
version = "3.3.3";
outputs = [ "bin" "out" "dev" ];
src = fetchFromGitHub {
owner = "DrTimothyAldenDavis";
repo = "SuiteSparse";
rev = "v${suitesparseVersion}";
hash = "sha256-wE1DKC0Hn3Q9X1FzKH7Kev26ICNWH0LEKQIQP98AGuo=";
};
nativeBuildInputs = [
cmake
];
buildInputs = [
blas
] ++ lib.optionals stdenv.cc.isClang [
llvmPackages.openmp
];
dontUseCmakeConfigure = true;
cmakeFlags = [
"-DBLAS_LIBRARIES=${blas}"
"-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON"
];
buildPhase = ''
runHook preConfigure
for f in SuiteSparse_config Mongoose; do
(cd $f && cmakeConfigurePhase && make -j$NIX_BUILD_CORES)
done
runHook postConfigure
'';
installPhase = ''
runHook preInstall
for f in SuiteSparse_config Mongoose; do
(cd $f/build && make install -j$NIX_BUILD_CORES)
done
runHook postInstall
'';
meta = with lib; {
description = "Graph Coarsening and Partitioning Library";
mainProgram = "suitesparse_mongoose";
homepage = "https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/Mongoose";
license = licenses.gpl3Only;
maintainers = with maintainers; [ wegank ];
platforms = with platforms; unix;
};
}
|