-
Notifications
You must be signed in to change notification settings - Fork 6
/
default.nix
54 lines (46 loc) · 1.08 KB
/
default.nix
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
{
lib,
stdenv,
cmake,
crocoddyl,
ipopt,
llvmPackages,
pkg-config,
python3Packages,
pythonSupport ? false,
}:
stdenv.mkDerivation {
pname = "colmpc";
version = "0.2.0";
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./CMakeLists.txt
./include
./package.xml
./python
./tests
];
};
nativeBuildInputs = [
cmake
pkg-config
] ++ lib.optional pythonSupport python3Packages.pythonImportsCheckHook;
buildInputs = lib.optional stdenv.cc.isClang llvmPackages.openmp;
propagatedBuildInputs =
[ ipopt ]
++ lib.optional pythonSupport python3Packages.crocoddyl
++ lib.optional (!pythonSupport) crocoddyl;
cmakeFlags = [
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport)
];
doCheck = true;
pythonImportsCheck = [ "colmpc" ];
meta = {
description = "Collision avoidance for MPC";
homepage = "https://github.com/agimus-project/colmpc";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ nim65s ];
platforms = lib.platforms.unix;
};
}