python3Packages.astropy-healpix: unbreak

+25 -8
+25 -8
pkgs/development/python-modules/astropy-healpix/default.nix
··· 3 3 , fetchPypi 4 4 , numpy 5 5 , astropy 6 - , astropy-helpers 6 + , astropy-extension-helpers 7 + , setuptools-scm 8 + , pytestCheckHook 9 + , pytest-doctestplus 10 + , hypothesis 7 11 }: 8 12 9 13 buildPythonPackage rec { 10 14 pname = "astropy-healpix"; 11 15 version = "0.6"; 12 16 13 - doCheck = false; # tests require pytest-astropy 14 - 15 17 src = fetchPypi { 16 - inherit pname version; 18 + inherit version; 19 + pname = lib.replaceStrings ["-"] ["_"] pname; 17 20 sha256 = "409a6621c383641456c074f0f0350a24a4a58e910eaeef14e9bbce3e00ad6690"; 18 21 }; 19 22 20 - propagatedBuildInputs = [ numpy astropy astropy-helpers ]; 23 + nativeBuildInputs = [ 24 + astropy-extension-helpers 25 + setuptools-scm 26 + ]; 27 + 28 + propagatedBuildInputs = [ 29 + numpy 30 + astropy 31 + ]; 21 32 22 - # Disable automatic update of the astropy-helper module 23 - postPatch = '' 24 - substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False" 33 + checkInputs = [ 34 + pytestCheckHook 35 + pytest-doctestplus 36 + hypothesis 37 + ]; 38 + 39 + # tests must be run in the build directory 40 + preCheck = '' 41 + cd build/lib* 25 42 ''; 26 43 27 44 meta = with lib; {