summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pvextractor/default.nix
blob: 7f45f7b59876e8b56a5bbf3809ebc9adf037c0f4 (plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  astropy,
  qtpy,
  pyqt6,
  pyqt-builder,
  setuptools,
  setuptools-scm,
  scipy,
  matplotlib,
  spectral-cube,
  pytestCheckHook,
  pytest-astropy,
}:

buildPythonPackage rec {
  pname = "pvextractor";
  version = "0.4";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "radio-astro-tools";
    repo = "pvextractor";
    tag = "v${version}";
    sha256 = "sha256-TjwoTtoGWU6C6HdFuS+gJj69PUnfchPHs7UjFqwftVQ=";
  };

  buildInputs = [ pyqt-builder ];
  nativeBuildInputs = [
    setuptools
    setuptools-scm
  ];
  propagatedBuildInputs = [
    astropy
    scipy
    matplotlib
    pyqt6
    qtpy
    spectral-cube
  ];

  # collecting ... qt.qpa.xcb: could not connect to display
  # qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
  doCheck = false;

  nativeCheckInputs = [
    pytestCheckHook
    pytest-astropy
  ];

  pythonImportsCheck = [ "pvextractor" ];

  meta = {
    homepage = "http://pvextractor.readthedocs.io";
    description = "Position-velocity diagram extractor";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ ifurther ];
  };
}