1{ lib
2, fetchPypi
3, buildPythonPackage
4, astropy
5, pytest
6, pytest-astropy
7, astropy-helpers
8, scipy
9}:
10
11buildPythonPackage rec {
12 pname = "radio_beam";
13 version = "0.3.2";
14
15 src = fetchPypi {
16 inherit pname version;
17 sha256 = "0g1nqiikv023ab60gfqrvc13kfjv8m70bpfk264vlliaq6mvxdf2";
18 };
19
20 propagatedBuildInputs = [ astropy ];
21
22 nativeBuildInputs = [ astropy-helpers ];
23
24 # Disable automatic update of the astropy-helper module
25 postPatch = ''
26 substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False"
27 '';
28
29 checkInputs = [ pytest pytest-astropy scipy ];
30
31 # Tests must be run in the build directory
32 checkPhase = ''
33 cd build/lib
34 pytest
35 '';
36
37 meta = {
38 description = "Tools for Beam IO and Manipulation";
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 };
44}
45
46