@@ -0,0 +1,62 @@
1+{ lib
2+, buildPythonPackage
3+, fetchurl
4+, numpy
5+, scipy
6+, matplotlib
7+, pyparsing
8+, tables
9+, cython
10+, python
11+, sympy
12+}:
13+
14+buildPythonPackage rec {
15+ name = "sfepy_${version}";
16+ version = "2019.2";
17+
18+ src = fetchurl {
19+ url="https://github.com/sfepy/sfepy/archive/release_${version}.tar.gz";
20+ sha256 = "17dj0wbchcfa6x27yx4d4jix4z4nk6r2640xkqcsw0mf62x5l1pj";
21+ };
22+
23+ propagatedBuildInputs = [
24+ numpy
25+ cython
26+ scipy
27+ matplotlib
28+ pyparsing
29+ tables
30+ sympy
31+ ];
32+
33+ postPatch = ''
34+ # broken test
35+ rm tests/test_homogenization_perfusion.py
36+
37+ # slow tests
38+ rm tests/test_input_*.py
39+ rm tests/test_elasticity_small_strain.py
40+ rm tests/test_term_call_modes.py
41+ rm tests/test_refine_hanging.py
42+ rm tests/test_hyperelastic_tlul.py
43+ rm tests/test_poly_spaces.py
44+ rm tests/test_linear_solvers.py
45+ rm tests/test_quadratures.py
46+ '';
47+
48+ checkPhase = ''
49+ export HOME=$TMPDIR
50+ mv sfepy sfepy.hidden
51+ mkdir -p $HOME/.matplotlib
52+ echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
53+ ${python.interpreter} run_tests.py -o $TMPDIR/test_outputs --raise
54+ '';
55+
56+ meta = with lib; {
57+ homepage = https://sfepy.org/;
58+ description = "Simple Finite Elements in Python";
59+ license = licenses.bsd3;
60+ maintainers = with maintainers; [ wd15 ];
61+ };
62+}