Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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 openssh, 21 pyvista, 22 pytest, 23}: 24 25buildPythonPackage rec { 26 pname = "sfepy"; 27 version = "2024.1"; 28 pyproject = true; 29 30 disabled = pythonOlder "3.8"; 31 32 src = fetchFromGitHub { 33 owner = "sfepy"; 34 repo = "sfepy"; 35 rev = "release_${version}"; 36 hash = "sha256-r2Qx9uJmVS4ugJxrIxg2UscnYu1Qr4hEkcz66NyWGmA="; 37 }; 38 39 build-system = [ 40 cmake 41 cython_0 42 ninja 43 oldest-supported-numpy 44 setuptools 45 scikit-build 46 ]; 47 48 dontUseCmakeConfigure = true; 49 50 dependencies = [ 51 numpy 52 scipy 53 matplotlib 54 pyparsing 55 tables 56 sympy 57 meshio 58 pyvista 59 ]; 60 61 postPatch = '' 62 # slow tests 63 rm sfepy/tests/test_io.py 64 rm sfepy/tests/test_elasticity_small_strain.py 65 rm sfepy/tests/test_term_call_modes.py 66 rm sfepy/tests/test_refine_hanging.py 67 rm sfepy/tests/test_hyperelastic_tlul.py 68 rm sfepy/tests/test_poly_spaces.py 69 rm sfepy/tests/test_linear_solvers.py 70 rm sfepy/tests/test_quadratures.py 71 ''; 72 73 nativeCheckInputs = [ pytest ]; 74 75 checkPhase = '' 76 export OMPI_MCA_plm_rsh_agent=${openssh}/bin/ssh 77 export HOME=$TMPDIR 78 mv sfepy sfepy.hidden 79 mkdir -p $HOME/.matplotlib 80 echo "backend: ps" > $HOME/.matplotlib/matplotlibrc 81 ${python.interpreter} -c "import sfepy; sfepy.test()" 82 ''; 83 84 meta = { 85 homepage = "https://sfepy.org/"; 86 description = "Simple Finite Elements in Python"; 87 license = lib.licenses.bsd3; 88 maintainers = with lib.maintainers; [ wd15 ]; 89 }; 90}