nixpkgs/pkgs/development/python-modules/fipy/default.nix

59 lines
1.1 KiB
Nix
Raw Normal View History

2019-07-12 16:25:12 +01:00
{ lib
, buildPythonPackage
, fetchPypi
, numpy
, scipy
, pyamg
, pysparse
, future
, matplotlib
, tkinter
, mpi4py
, scikit-fmm
, isPy27
, gmsh
, python
, stdenv
2020-02-25 18:13:00 +00:00
, openssh
, fetchurl
2019-07-12 16:25:12 +01:00
}:
let
not_darwin_inputs = lib.optionals (! stdenv.isDarwin) [ gmsh ];
in
buildPythonPackage rec {
pname = "fipy";
2020-02-25 18:13:00 +00:00
version = "3.4.1";
2019-07-12 16:25:12 +01:00
2020-02-25 18:13:00 +00:00
src = fetchurl {
url = "https://github.com/usnistgov/fipy/releases/download/${version}/FiPy-${version}.tar.gz";
sha256 = "0078yg96fknqhywn1v26ryc5z47c0j0c1qwz6p8wsjn0wmzggaqk";
2019-07-12 16:25:12 +01:00
};
propagatedBuildInputs = [
numpy
scipy
pyamg
matplotlib
tkinter
mpi4py
future
scikit-fmm
2020-02-25 18:13:00 +00:00
openssh
2019-07-12 16:25:12 +01:00
] ++ lib.optionals isPy27 [ pysparse ] ++ not_darwin_inputs;
checkInputs = not_darwin_inputs;
checkPhase = ''
2020-02-25 18:13:00 +00:00
export OMPI_MCA_plm_rsh_agent=${openssh}/bin/ssh
2019-07-12 16:25:12 +01:00
${python.interpreter} setup.py test --modules
'';
meta = with lib; {
homepage = "https://www.ctcms.nist.gov/fipy/";
2019-07-12 16:25:12 +01:00
description = "A Finite Volume PDE Solver Using Python";
license = licenses.free;
maintainers = with maintainers; [ costrouc wd15 ];
};
}