at 24.11-pre 1.8 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 cmake, 7 cython_0, 8 ninja, 9 oldest-supported-numpy, 10 setuptools, 11 scikit-build, 12 numpy, 13 scipy, 14 matplotlib, 15 pyparsing, 16 tables, 17 python, 18 sympy, 19 meshio, 20 mpi4py, 21 psutil, 22 openssh, 23 pyvista, 24 pytest, 25 stdenv, 26}: 27 28buildPythonPackage rec { 29 pname = "sfepy"; 30 version = "2024.1"; 31 pyproject = true; 32 33 disabled = pythonOlder "3.8"; 34 35 src = fetchFromGitHub { 36 owner = "sfepy"; 37 repo = "sfepy"; 38 rev = "release_${version}"; 39 hash = "sha256-r2Qx9uJmVS4ugJxrIxg2UscnYu1Qr4hEkcz66NyWGmA="; 40 }; 41 42 build-system = [ 43 cmake 44 cython_0 45 ninja 46 oldest-supported-numpy 47 setuptools 48 scikit-build 49 ]; 50 51 dontUseCmakeConfigure = true; 52 53 dependencies = [ 54 numpy 55 scipy 56 matplotlib 57 pyparsing 58 tables 59 sympy 60 meshio 61 pyvista 62 ]; 63 64 postPatch = '' 65 # slow tests 66 rm sfepy/tests/test_io.py 67 rm sfepy/tests/test_elasticity_small_strain.py 68 rm sfepy/tests/test_term_call_modes.py 69 rm sfepy/tests/test_refine_hanging.py 70 rm sfepy/tests/test_hyperelastic_tlul.py 71 rm sfepy/tests/test_poly_spaces.py 72 rm sfepy/tests/test_linear_solvers.py 73 rm sfepy/tests/test_quadratures.py 74 ''; 75 76 nativeCheckInputs = [ pytest ]; 77 78 checkPhase = '' 79 export OMPI_MCA_plm_rsh_agent=${openssh}/bin/ssh 80 export HOME=$TMPDIR 81 mv sfepy sfepy.hidden 82 mkdir -p $HOME/.matplotlib 83 echo "backend: ps" > $HOME/.matplotlib/matplotlibrc 84 ${python.interpreter} -c "import sfepy; sfepy.test()" 85 ''; 86 87 meta = { 88 homepage = "https://sfepy.org/"; 89 description = "Simple Finite Elements in Python"; 90 license = lib.licenses.bsd3; 91 maintainers = with lib.maintainers; [ wd15 ]; 92 broken = stdenv.isDarwin; 93 }; 94}