summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/fipy/default.nix
blob: 07d11670efb71159a8e6381dab3da63947faf711 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{ lib
, buildPythonPackage
, numpy
, scipy
, pyamg
, future
, matplotlib
, tkinter
, mpi4py
, scikit-fmm
, gmsh
, python
, stdenv
, openssh
, fetchFromGitHub
}:

buildPythonPackage rec {
  pname = "fipy";
  version = "3.4.3";

  src = fetchFromGitHub {
    owner = "usnistgov";
    repo = "fipy";
    rev = version;
    sha256 = "sha256-oTg/5fGXqknWBh1ShdAOdOwX7lVDieIoM5aALcOWFqY=";
  };

  propagatedBuildInputs = [
    numpy
    scipy
    pyamg
    matplotlib
    tkinter
    mpi4py
    future
    scikit-fmm
    openssh
  ] ++ lib.optionals (!stdenv.isDarwin) [ gmsh ];

  nativeCheckInputs = lib.optionals (!stdenv.isDarwin) [ gmsh ];

  checkPhase = ''
    export OMPI_MCA_plm_rsh_agent=${openssh}/bin/ssh
    ${python.interpreter} setup.py test --modules
  '';

  pythonImportsCheck = [ "fipy" ];

  meta = with lib; {
    homepage = "https://www.ctcms.nist.gov/fipy/";
    description = "A Finite Volume PDE Solver Using Python";
    license = licenses.free;
    maintainers = with maintainers; [ costrouc wd15 ];
  };
}