about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/fipy/default.nix
blob: d54379d0683ec1e1f5e24056e9913f59c9ad23b2 (plain) (blame)
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
57
58
{ lib
, buildPythonPackage
, fetchPypi
, numpy
, scipy
, pyamg
, pysparse
, future
, matplotlib
, tkinter
, mpi4py
, scikit-fmm
, isPy27
, gmsh
, python
, stdenv
, openssh
, fetchurl
}:

let
  not_darwin_inputs = lib.optionals (! stdenv.isDarwin) [ gmsh ];
in
  buildPythonPackage rec {
    pname = "fipy";
    version = "3.4.1";

    src = fetchurl {
      url = "https://github.com/usnistgov/fipy/releases/download/${version}/FiPy-${version}.tar.gz";
      sha256 = "0078yg96fknqhywn1v26ryc5z47c0j0c1qwz6p8wsjn0wmzggaqk";
    };

    propagatedBuildInputs = [
      numpy
      scipy
      pyamg
      matplotlib
      tkinter
      mpi4py
      future
      scikit-fmm
      openssh
    ] ++ lib.optionals isPy27 [ pysparse ] ++ not_darwin_inputs;

    checkInputs = not_darwin_inputs;

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

    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 ];
    };
  }