2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2022-12-17 10:02:37 +00:00
|
|
|
, fetchpatch
|
2022-09-09 14:08:57 +00:00
|
|
|
, cmake
|
|
|
|
, swig
|
|
|
|
, boost
|
|
|
|
, spectra
|
|
|
|
, libxml2
|
|
|
|
, tbb
|
|
|
|
, hmat-oss
|
|
|
|
, nlopt
|
|
|
|
, cminpack
|
|
|
|
, ceres-solver
|
|
|
|
, dlib
|
|
|
|
, hdf5
|
|
|
|
, primesieve
|
|
|
|
, pagmo2
|
|
|
|
, ipopt
|
|
|
|
, Accelerate
|
|
|
|
# tests take an hour to build on a 48-core machine
|
|
|
|
, runTests ? false
|
|
|
|
, enablePython ? false
|
|
|
|
, python3Packages
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "openturns";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.21.2";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openturns";
|
|
|
|
repo = "openturns";
|
|
|
|
rev = "v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
sha256 = "sha256-Zq+Z3jLjdba3566H4RdwztqbRRID5K5yHvoGmgzq8QM=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ] ++ lib.optional enablePython python3Packages.sphinx;
|
|
|
|
buildInputs = [
|
|
|
|
swig
|
|
|
|
boost
|
|
|
|
spectra
|
|
|
|
libxml2
|
|
|
|
tbb
|
|
|
|
hmat-oss
|
|
|
|
nlopt
|
|
|
|
cminpack
|
|
|
|
ceres-solver
|
|
|
|
dlib
|
|
|
|
hdf5
|
|
|
|
primesieve
|
|
|
|
pagmo2
|
|
|
|
ipopt
|
|
|
|
] ++ lib.optionals enablePython [
|
|
|
|
python3Packages.python
|
|
|
|
python3Packages.matplotlib
|
|
|
|
python3Packages.psutil
|
|
|
|
python3Packages.dill
|
|
|
|
] ++ lib.optional stdenv.isDarwin Accelerate;
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DOPENTURNS_SYSCONFIG_PATH=$out/etc"
|
|
|
|
"-DCMAKE_UNITY_BUILD=ON"
|
|
|
|
"-DCMAKE_UNITY_BUILD_BATCH_SIZE=32"
|
|
|
|
"-DSWIG_COMPILE_FLAGS='-O1'"
|
|
|
|
"-DUSE_SPHINX=${if enablePython then "ON" else "OFF"}"
|
|
|
|
"-DBUILD_PYTHON=${if enablePython then "ON" else "OFF"}"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = runTests;
|
|
|
|
|
|
|
|
checkTarget = "tests check";
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Multivariate probabilistic modeling and uncertainty treatment library";
|
|
|
|
license = with licenses; [ lgpl3 gpl3 ];
|
|
|
|
homepage = "https://openturns.github.io/www/";
|
2023-10-09 19:29:22 +00:00
|
|
|
changelog = "https://github.com/openturns/openturns/raw/v${version}/ChangeLog";
|
2022-09-09 14:08:57 +00:00
|
|
|
maintainers = with maintainers; [ gdinh ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|