nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
fork

Configure Feed

Select the types of activity you want to include in your feed.

at litex 90 lines 2.0 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, fetchpatch 5, cmake 6, swig 7, boost 8, spectra 9, libxml2 10, tbb 11, hmat-oss 12, nlopt 13, cminpack 14, ceres-solver 15, dlib 16, hdf5 17, primesieve 18, pagmo2 19, ipopt 20, Accelerate 21# tests take an hour to build on a 48-core machine 22, runTests ? false 23, enablePython ? false 24, python3Packages 25}: 26 27stdenv.mkDerivation rec { 28 pname = "openturns"; 29 version = "1.20"; 30 31 src = fetchFromGitHub { 32 owner = "openturns"; 33 repo = "openturns"; 34 rev = "v${version}"; 35 sha256 = "sha256-QeapH937yGnK6oD+rgIERePxz6ooxGpOx6x9LyFDt2A="; 36 }; 37 38 patches = [ 39 # Fix build with primesieve 11, https://github.com/openturns/openturns/pull/2187 40 # Remove with next version update. 41 (fetchpatch { 42 url = "https://github.com/openturns/openturns/commit/a85061f89a5763061467beac516c1355fe81b9be.patch"; 43 hash = "sha256-z28ipBuX3b5UFEnKuDfp+kMI5cUcwXVz/8WZHlICnvE="; 44 }) 45 ]; 46 47 nativeBuildInputs = [ cmake ] ++ lib.optional enablePython python3Packages.sphinx; 48 buildInputs = [ 49 swig 50 boost 51 spectra 52 libxml2 53 tbb 54 hmat-oss 55 nlopt 56 cminpack 57 ceres-solver 58 dlib 59 hdf5 60 primesieve 61 pagmo2 62 ipopt 63 ] ++ lib.optionals enablePython [ 64 python3Packages.python 65 python3Packages.matplotlib 66 python3Packages.psutil 67 python3Packages.dill 68 ] ++ lib.optional stdenv.isDarwin Accelerate; 69 70 cmakeFlags = [ 71 "-DOPENTURNS_SYSCONFIG_PATH=$out/etc" 72 "-DCMAKE_UNITY_BUILD=ON" 73 "-DCMAKE_UNITY_BUILD_BATCH_SIZE=32" 74 "-DSWIG_COMPILE_FLAGS='-O1'" 75 "-DUSE_SPHINX=${if enablePython then "ON" else "OFF"}" 76 "-DBUILD_PYTHON=${if enablePython then "ON" else "OFF"}" 77 ]; 78 79 doCheck = runTests; 80 81 checkTarget = "tests check"; 82 83 meta = with lib; { 84 description = "Multivariate probabilistic modeling and uncertainty treatment library"; 85 license = with licenses; [ lgpl3 gpl3 ]; 86 homepage = "https://openturns.github.io/www/"; 87 maintainers = with maintainers; [ gdinh ]; 88 platforms = platforms.unix; 89 }; 90}