1{lib, fetchFromGitHub, python, pythonOlder, buildPythonPackage, gfortran, mock, xarray, wrapt, numpy, netcdf4}:
2
3buildPythonPackage rec {
4 pname = "wrf-python";
5 version = "1.3.1.1";
6
7 src = fetchFromGitHub {
8 owner = "NCAR";
9 repo = "wrf-python";
10 rev = version;
11 sha256 = "12mm7x1r5md6x28vmwyh6k655pgsv6knj8ycmjbxxk8bk7qsj74h";
12 };
13
14 propagatedBuildInputs = [
15 wrapt
16 numpy
17 xarray
18 ];
19
20 nativeBuildInputs = [
21 gfortran
22 ];
23
24 checkInputs = [
25 netcdf4
26 ] ++ lib.optional (pythonOlder "3.3") mock;
27
28 doCheck = true;
29 checkPhase = ''
30 runHook preCheck
31 cd ./test/ci_tests
32 python utests.py
33 runHook postCheck
34 '';
35
36 meta = {
37 description = "WRF postprocessing library for Python";
38 homepage = http://wrf-python.rtfd.org;
39 license = lib.licenses.asl20;
40 maintainers = with lib.maintainers; [ mhaselsteiner ];
41 };
42}