forked from siconos/siconos
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsiconos.nix
More file actions
28 lines (22 loc) · 857 Bytes
/
siconos.nix
File metadata and controls
28 lines (22 loc) · 857 Bytes
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
{ pkgs ? import <nixpkgs> {},
gcc ? pkgs.gcc ,
gfortran ? pkgs.gfortran,
numerics_only ? false,
enable_python ? true,
python ? pkgs.python36,
blas_name ? "openblas",
blas_implem ? pkgs.openblas.override { blas64 = false; },
}:
with pkgs;
let version = "1.0.0" ; in
stdenv.mkDerivation rec {
name = "siconos-${version}";
buildInputs = [ cmake pkgconfig gcc gfortran python blas_implem pkgs.gmp pkgs.boost]
++ stdenv.lib.optional (numerics_only == false)[pkgs.boost];
cmakeFlags = [ " " ]
++ stdenv.lib.optional (numerics_only == true) [ "-DCOMPONENTS=externals;numerics -DWITH_CXX=OFF" ]
++ stdenv.lib.optional (enable_python != true) [ "-DWITH_PYTHON_WRAPPER=OFF" ]
++ stdenv.lib.optional (enable_python != true) [ "-DWITH_BLAS=${blas_name}" ];
hardeningDisable = [ "format" ];
src = ./.;
}