2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
buildPythonPackage,
|
|
|
|
basemap,
|
|
|
|
gfortran,
|
|
|
|
netcdf4,
|
|
|
|
numpy,
|
|
|
|
python,
|
|
|
|
setuptools,
|
|
|
|
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
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ gfortran ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
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
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ netcdf4 ];
|
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
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "wrf" ];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
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 ];
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|