2022-06-16 17:23:12 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2022-03-30 09:31:56 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, buildPythonPackage
|
2022-08-12 12:06:08 +00:00
|
|
|
, basemap
|
2022-03-30 09:31:56 +00:00
|
|
|
, gfortran
|
|
|
|
, netcdf4
|
2022-08-12 12:06:08 +00:00
|
|
|
, numpy
|
|
|
|
, python
|
2022-03-30 09:31:56 +00:00
|
|
|
, setuptools
|
2022-08-12 12:06:08 +00:00
|
|
|
, xarray
|
|
|
|
, wrapt
|
2022-03-30 09:31:56 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "wrf-python";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "1.3.4.1";
|
2022-03-30 09:31:56 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "NCAR";
|
|
|
|
repo = "wrf-python";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-4iIs/M9fzGJsnKCDSl09OTUoh7j6REBXuutE5uXFe3k=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
gfortran
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
basemap
|
2020-04-24 23:36:52 +00:00
|
|
|
numpy
|
|
|
|
setuptools
|
|
|
|
xarray
|
2022-08-12 12:06:08 +00:00
|
|
|
wrapt
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
netcdf4
|
2022-03-30 09:31:56 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
cd ./test/ci_tests
|
2022-08-12 12:06:08 +00:00
|
|
|
${python.interpreter} utests.py
|
2020-04-24 23:36:52 +00:00
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"wrf"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "WRF postprocessing library for Python";
|
|
|
|
homepage = "http://wrf-python.rtfd.org";
|
2022-03-30 09:31:56 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ mhaselsteiner ];
|
2023-07-15 17:15:38 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|