nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv
2, lib
3, fetchFromGitHub
4, pythonOlder
5, buildPythonPackage
6, gfortran
7, xarray
8, wrapt
9, numpy
10, netcdf4
11, setuptools
12}:
13
14buildPythonPackage rec {
15 pname = "wrf-python";
16 version = "1.3.3";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "NCAR";
23 repo = "wrf-python";
24 rev = version;
25 hash = "sha256-+v4FEK0FVE0oAIb18XDTOInHKfxXyykb1ngk9Uxwf0c=";
26 };
27
28 propagatedBuildInputs = [
29 wrapt
30 numpy
31 setuptools
32 xarray
33 ];
34
35 nativeBuildInputs = [
36 gfortran
37 ];
38
39 checkInputs = [
40 netcdf4
41 ];
42
43 checkPhase = ''
44 runHook preCheck
45 cd ./test/ci_tests
46 python utests.py
47 runHook postCheck
48 '';
49
50 pythonImportsCheck = [
51 "wrf"
52 ];
53
54 meta = with lib; {
55 broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
56 description = "WRF postprocessing library for Python";
57 homepage = "http://wrf-python.rtfd.org";
58 license = licenses.asl20;
59 maintainers = with maintainers; [ mhaselsteiner ];
60 };
61}