20 # tests take an hour to build on a 48-core machine
22 , enablePython ? false
26 stdenv.mkDerivation rec {
30 src = fetchFromGitHub {
34 sha256 = "sha256-hSvhKx7Ke5PXPYGcn9OJvq7YooAbHrbP6TdLZBotriE=";
37 nativeBuildInputs = [ cmake ] ++ lib.optional enablePython python3Packages.sphinx;
53 ] ++ lib.optionals enablePython [
54 python3Packages.python
55 python3Packages.matplotlib
56 python3Packages.psutil
58 ] ++ lib.optional stdenv.isDarwin Accelerate;
61 "-DOPENTURNS_SYSCONFIG_PATH=$out/etc"
62 "-DCMAKE_UNITY_BUILD=ON"
63 "-DCMAKE_UNITY_BUILD_BATCH_SIZE=32"
64 "-DSWIG_COMPILE_FLAGS='-O1'"
65 "-DUSE_SPHINX=${if enablePython then "ON" else "OFF"}"
66 "-DBUILD_PYTHON=${if enablePython then "ON" else "OFF"}"
71 checkTarget = "tests check";
74 description = "Multivariate probabilistic modeling and uncertainty treatment library";
75 license = with licenses; [ lgpl3 gpl3 ];
76 homepage = "https://openturns.github.io/www/";
77 maintainers = with maintainers; [ gdinh ];
78 platforms = platforms.unix;