2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2023-02-16 17:41:37 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2024-01-02 11:29:13 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, numpy
|
|
|
|
, astropy
|
2021-05-20 23:08:51 +00:00
|
|
|
, astropy-extension-helpers
|
|
|
|
, setuptools-scm
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-doctestplus
|
|
|
|
, hypothesis
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "astropy-healpix";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.0.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2021-05-20 23:08:51 +00:00
|
|
|
inherit version;
|
|
|
|
pname = lib.replaceStrings ["-"] ["_"] pname;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-9ILvYqEOaGMD84xm8I3xe53e5a2CIZwjVx7oDXar7qM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
patches = [
|
|
|
|
# remove on next udpate. make Numpy loop function args const correct.
|
|
|
|
# https://github.com/astropy/astropy-healpix/pull/199
|
|
|
|
(fetchpatch {
|
|
|
|
name = "numpy-const-args-match.patch";
|
|
|
|
url = "https://github.com/astropy/astropy-healpix/commit/ccf6d9ea4be131f56646adbd7bc482bfcd84f21c.patch";
|
|
|
|
hash = "sha256-fpDxTbs3sHJSb4mnveorM+wlseXbZu1biGyBTNC9ZUo=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
astropy-extension-helpers
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
astropy
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-doctestplus
|
|
|
|
hypothesis
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
disabledTests = lib.optional (!stdenv.hostPlatform.isDarwin) "test_interpolate_bilinear_skycoord";
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
# tests must be run in the build directory
|
|
|
|
preCheck = ''
|
|
|
|
cd build/lib*
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "BSD-licensed HEALPix for Astropy";
|
|
|
|
homepage = "https://github.com/astropy/astropy-healpix";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.smaret ];
|
|
|
|
};
|
|
|
|
}
|