1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 astropy,
7 qtpy,
8 pyqt6,
9 pyqt-builder,
10 setuptools,
11 setuptools-scm,
12 scipy,
13 matplotlib,
14 spectral-cube,
15 pytestCheckHook,
16 pytest-astropy,
17}:
18
19buildPythonPackage rec {
20 pname = "pvextractor";
21 version = "0.4";
22 format = "setuptools";
23
24 disabled = pythonOlder "3.5";
25
26 src = fetchFromGitHub {
27 owner = "radio-astro-tools";
28 repo = "pvextractor";
29 tag = "v${version}";
30 sha256 = "sha256-TjwoTtoGWU6C6HdFuS+gJj69PUnfchPHs7UjFqwftVQ=";
31 };
32
33 buildInputs = [ pyqt-builder ];
34 nativeBuildInputs = [
35 setuptools
36 setuptools-scm
37 ];
38 propagatedBuildInputs = [
39 astropy
40 scipy
41 matplotlib
42 pyqt6
43 qtpy
44 spectral-cube
45 ];
46
47 # collecting ... qt.qpa.xcb: could not connect to display
48 # qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
49 doCheck = false;
50
51 nativeCheckInputs = [
52 pytestCheckHook
53 pytest-astropy
54 ];
55
56 pythonImportsCheck = [ "pvextractor" ];
57
58 meta = with lib; {
59 homepage = "http://pvextractor.readthedocs.io";
60 description = "Position-velocity diagram extractor";
61 license = licenses.bsd3;
62 maintainers = with maintainers; [ ifurther ];
63 };
64}