1{ lib
2, fetchPypi
3, buildPythonPackage
4, astropy
5, radio_beam
6, pytest
7, pytest-astropy
8, astropy-helpers
9}:
10
11buildPythonPackage rec {
12 pname = "spectral-cube";
13 version = "0.4.4";
14
15 src = fetchPypi {
16 inherit pname version;
17 sha256 = "9051ede204b1e25b6358b5e0e573b624ec0e208c24eb03a7ed4925b745c93b5e";
18 };
19
20 propagatedBuildInputs = [ astropy radio_beam ];
21
22 nativeBuildInputs = [ astropy-helpers ];
23
24 checkInputs = [ pytest pytest-astropy ];
25
26 # Disable automatic update of the astropy-helper module
27 postPatch = ''
28 substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False"
29 '';
30
31 # Tests must be run in the build directory
32 checkPhase = ''
33 cd build/lib
34 pytest
35 '';
36
37 meta = {
38 description = "Library for reading and analyzing astrophysical spectral data cubes";
39 homepage = http://radio-astro-tools.github.io;
40 license = lib.licenses.bsd3;
41 platforms = lib.platforms.all;
42 maintainers = with lib.maintainers; [ smaret ];
43 broken = true;
44 };
45}
46
47