tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
pagmo2: add platforms and unbreak on darwin
Grace Dinh
3 years ago
1c3aae62
faef0022
+12
-5
1 changed file
expand all
collapse all
unified
split
pkgs
development
libraries
pagmo2
default.nix
+12
-5
pkgs/development/libraries/pagmo2/default.nix
···
6
, ipopt
7
, boost
8
, tbb
0
0
9
}:
10
11
stdenv.mkDerivation rec {
···
20
};
21
22
nativeBuildInputs = [ cmake ];
23
-
buildInputs = [ eigen nlopt ipopt boost tbb ];
24
25
cmakeFlags = [
26
-
"-DPAGMO_BUILD_TESTS=no"
27
"-DPAGMO_WITH_EIGEN3=yes"
28
"-DPAGMO_WITH_NLOPT=yes"
29
-
"-DNLOPT_LIBRARY=${nlopt}/lib/libnlopt.so"
0
30
"-DPAGMO_WITH_IPOPT=yes"
31
"-DCMAKE_CXX_FLAGS='-fuse-ld=gold'"
0
0
0
0
32
];
33
34
-
# tests pass but take 30+ minutes
35
-
doCheck = false;
36
37
meta = with lib; {
38
homepage = "https://esa.github.io/pagmo2/";
39
description = "Scientific library for massively parallel optimization";
40
license = licenses.gpl3Plus;
0
41
maintainers = [ maintainers.costrouc ];
42
};
43
}
···
6
, ipopt
7
, boost
8
, tbb
9
+
# tests pass but take 30+ minutes
10
+
, runTests ? false
11
}:
12
13
stdenv.mkDerivation rec {
···
22
};
23
24
nativeBuildInputs = [ cmake ];
25
+
buildInputs = [ eigen nlopt boost tbb ] ++ lib.optional (!stdenv.isDarwin) ipopt;
26
27
cmakeFlags = [
28
+
"-DPAGMO_BUILD_TESTS=${if runTests then "ON" else "OFF"}"
29
"-DPAGMO_WITH_EIGEN3=yes"
30
"-DPAGMO_WITH_NLOPT=yes"
31
+
"-DNLOPT_LIBRARY=${nlopt}/lib/libnlopt${stdenv.hostPlatform.extensions.sharedLibrary}"
32
+
] ++ lib.optionals stdenv.isLinux [
33
"-DPAGMO_WITH_IPOPT=yes"
34
"-DCMAKE_CXX_FLAGS='-fuse-ld=gold'"
35
+
] ++ lib.optionals stdenv.isDarwin [
36
+
# FIXME: fails ipopt test with Invalid_Option on darwin, so disable.
37
+
"-DPAGMO_WITH_IPOPT=no"
38
+
"-DLLVM_USE_LINKER=gold"
39
];
40
41
+
doCheck = runTests;
0
42
43
meta = with lib; {
44
homepage = "https://esa.github.io/pagmo2/";
45
description = "Scientific library for massively parallel optimization";
46
license = licenses.gpl3Plus;
47
+
platforms = platforms.unix;
48
maintainers = [ maintainers.costrouc ];
49
};
50
}