blob: 534f74216e33b04e7f1988adde12c6326d6def00 (
plain)
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
71
72
73
74
75
|
{
lib,
stdenv,
fetchFromGitHub,
cmake,
blas,
llvmPackages,
}:
let
suitesparseVersion = "7.12.1";
in
stdenv.mkDerivation {
pname = "mongoose";
version = "3.3.6";
outputs = [
"bin"
"out"
"dev"
];
src = fetchFromGitHub {
owner = "DrTimothyAldenDavis";
repo = "SuiteSparse";
tag = "v${suitesparseVersion}";
hash = "sha256-6EMPEH5dcNT1qtuSlzR26RhpfN7MbYJdSKcrsQ0Pzow=";
};
nativeBuildInputs = [
cmake
];
buildInputs = [
blas
]
++ lib.optionals stdenv.cc.isClang [
llvmPackages.openmp
];
dontUseCmakeConfigure = true;
cmakeFlags = [
"-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON"
];
buildPhase = ''
runHook preBuild
for f in SuiteSparse_config Mongoose; do
(cd $f && cmakeConfigurePhase && make -j$NIX_BUILD_CORES)
done
runHook postBuild
'';
installPhase = ''
runHook preInstall
for f in SuiteSparse_config Mongoose; do
(cd $f/build && make install -j$NIX_BUILD_CORES)
done
runHook postInstall
'';
meta = {
description = "Graph Coarsening and Partitioning Library";
mainProgram = "suitesparse_mongoose";
homepage = "https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/Mongoose";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ wegank ];
platforms = with lib.platforms; unix;
};
}
|