Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv 2, lib 3, buildPythonPackage 4, fetchFromGitHub 5, numpy 6, scipy 7, matplotlib 8, pyparsing 9, tables 10, cython 11, python 12, sympy 13, meshio 14, mpi4py 15, psutil 16, openssh 17, pyvista 18, pytest 19, pythonOlder 20}: 21 22buildPythonPackage rec { 23 pname = "sfepy"; 24 version = "2022.3"; 25 disabled = pythonOlder "3.8"; 26 27 src = fetchFromGitHub { 28 owner = "sfepy"; 29 repo = "sfepy"; 30 rev = "release_${version}"; 31 hash = "sha256-6AhyO6LRG6N62ZAoPCZpRKu4ZBzj9IHkurhKFIPFAJI="; 32 }; 33 34 propagatedBuildInputs = [ 35 numpy 36 cython 37 scipy 38 matplotlib 39 pyparsing 40 tables 41 sympy 42 meshio 43 mpi4py 44 psutil 45 openssh 46 pyvista 47 ]; 48 49 postPatch = '' 50 # broken tests 51 rm sfepy/tests/test_meshio.py 52 53 # slow tests 54 rm sfepy/tests/test_io.py 55 rm sfepy/tests/test_elasticity_small_strain.py 56 rm sfepy/tests/test_term_call_modes.py 57 rm sfepy/tests/test_refine_hanging.py 58 rm sfepy/tests/test_hyperelastic_tlul.py 59 rm sfepy/tests/test_poly_spaces.py 60 rm sfepy/tests/test_linear_solvers.py 61 rm sfepy/tests/test_quadratures.py 62 ''; 63 64 nativeCheckInputs = [ 65 pytest 66 ]; 67 68 checkPhase = '' 69 export OMPI_MCA_plm_rsh_agent=${openssh}/bin/ssh 70 export HOME=$TMPDIR 71 mv sfepy sfepy.hidden 72 mkdir -p $HOME/.matplotlib 73 echo "backend: ps" > $HOME/.matplotlib/matplotlibrc 74 ${python.interpreter} -c "import sfepy; sfepy.test()" 75 ''; 76 77 meta = with lib; { 78 homepage = "https://sfepy.org/"; 79 description = "Simple Finite Elements in Python"; 80 license = licenses.bsd3; 81 maintainers = with maintainers; [ wd15 ]; 82 }; 83}