about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/wrf-python/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/wrf-python/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/wrf-python/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/wrf-python/default.nix b/nixpkgs/pkgs/development/python-modules/wrf-python/default.nix
new file mode 100644
index 000000000000..3adbaa942dd5
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/wrf-python/default.nix
@@ -0,0 +1,42 @@
+{lib, fetchFromGitHub, python, pythonOlder, buildPythonPackage, gfortran, mock, xarray, wrapt, numpy, netcdf4}:
+
+buildPythonPackage rec {
+  pname = "wrf-python";
+  version = "1.3.1.1";
+
+  src = fetchFromGitHub {
+    owner = "NCAR";
+    repo = "wrf-python";
+    rev = version;
+    sha256 = "12mm7x1r5md6x28vmwyh6k655pgsv6knj8ycmjbxxk8bk7qsj74h";
+  };
+
+  propagatedBuildInputs = [
+    wrapt
+    numpy
+    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 ];
+	};
+}
\ No newline at end of file