summary refs log tree commit diff
path: root/pkgs/development/python-modules/wrf-python/default.nix
blob: 94234b2626e2b226e1888db0e8304fcb2522c14e (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
{lib, fetchFromGitHub, pythonOlder, buildPythonPackage, gfortran, mock, xarray, wrapt, numpy, netcdf4, setuptools}:

buildPythonPackage rec {
  pname = "wrf-python";
  version = "1.3.2.6";

  src = fetchFromGitHub {
    owner = "NCAR";
    repo = "wrf-python";
    rev = version;
    sha256 = "046kflai71r7xrmdw6jn0ifn5656wj9gpnwlgxkx430dgk7zbc2y";
  };

  propagatedBuildInputs = [
    wrapt
    numpy
    setuptools
    xarray
  ];

  nativeBuildInputs = [
    gfortran
  ];

  checkInputs = [
    netcdf4
  ] ++ lib.optional (pythonOlder "3.3") mock;

  doCheck = true;
  checkPhase = ''
    runHook preCheck
    cd ./test/ci_tests
    python utests.py
    runHook postCheck
  '';

  meta = {
    description = "WRF postprocessing library for Python";
    homepage = "http://wrf-python.rtfd.org";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ mhaselsteiner ];
  };
}