1{ lib
2, buildPythonPackage
3, fetchPypi
4, numpy
5, scipy
6, pyamg
7, pysparse
8, future
9, matplotlib
10, tkinter
11, mpi4py
12, scikit-fmm
13, isPy27
14, gmsh
15, python
16, stdenv
17, openssh
18, fetchurl
19}:
20
21let
22 not_darwin_inputs = lib.optionals (! stdenv.isDarwin) [ gmsh ];
23in
24 buildPythonPackage rec {
25 pname = "fipy";
26 version = "3.4.1";
27
28 src = fetchurl {
29 url = "https://github.com/usnistgov/fipy/releases/download/${version}/FiPy-${version}.tar.gz";
30 sha256 = "0078yg96fknqhywn1v26ryc5z47c0j0c1qwz6p8wsjn0wmzggaqk";
31 };
32
33 propagatedBuildInputs = [
34 numpy
35 scipy
36 pyamg
37 matplotlib
38 tkinter
39 mpi4py
40 future
41 scikit-fmm
42 openssh
43 ] ++ lib.optionals isPy27 [ pysparse ] ++ not_darwin_inputs;
44
45 checkInputs = not_darwin_inputs;
46
47 checkPhase = ''
48 export OMPI_MCA_plm_rsh_agent=${openssh}/bin/ssh
49 ${python.interpreter} setup.py test --modules
50 '';
51
52 meta = with lib; {
53 homepage = https://www.ctcms.nist.gov/fipy/;
54 description = "A Finite Volume PDE Solver Using Python";
55 license = licenses.free;
56 maintainers = with maintainers; [ costrouc wd15 ];
57 };
58 }