about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/radio_beam/default.nix
blob: f1f3200bb7b004c82d97c91e3dfb09f2ff830a61 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ lib
, fetchPypi
, buildPythonPackage
, astropy
, pytest
, pytest-astropy
, astropy-helpers
, scipy
}:

buildPythonPackage rec {
  pname = "radio_beam";
  version = "0.3.3";

  src = fetchPypi {
    inherit pname version;
    sha256 = "e34902d91713ccab9f450b9d3e82317e292cf46a30bd42f9ad3c9a0519fcddcd";
  };

  propagatedBuildInputs = [ astropy ];

  nativeBuildInputs = [ astropy-helpers ];

  # Disable automatic update of the astropy-helper module
  postPatch = ''
    substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False"
  '';

  checkInputs = [ pytest pytest-astropy scipy ];

  # Tests must be run in the build directory
  checkPhase = ''
    cd build/lib
    pytest
  '';

  meta = {
    description = "Tools for Beam IO and Manipulation";
    homepage = "http://radio-astro-tools.github.io";
    license = lib.licenses.bsd3;
    platforms = lib.platforms.all;
    maintainers = with lib.maintainers; [ smaret ];
  };
}