1{
2 lib,
3 asdf-coordinates-schemas,
4 asdf-standard,
5 asdf-transform-schemas,
6 asdf,
7 astropy,
8 buildPythonPackage,
9 fetchFromGitHub,
10 numpy,
11 packaging,
12 pytest-astropy,
13 pytestCheckHook,
14 pythonOlder,
15 scipy,
16 setuptools-scm,
17 setuptools,
18}:
19
20buildPythonPackage rec {
21 pname = "asdf-astropy";
22 version = "0.8.0";
23 pyproject = true;
24
25 disabled = pythonOlder "3.10";
26
27 src = fetchFromGitHub {
28 owner = "astropy";
29 repo = "asdf-astropy";
30 tag = version;
31 hash = "sha256-CCLoG3zV34kmdGYN6RLi5u2v0RDvEqVN6VcdrX7L4uY=";
32 };
33
34 build-system = [
35 setuptools
36 setuptools-scm
37 ];
38
39 dependencies = [
40 asdf
41 asdf-coordinates-schemas
42 asdf-standard
43 asdf-transform-schemas
44 astropy
45 numpy
46 packaging
47 ];
48
49 nativeCheckInputs = [
50 pytest-astropy
51 pytestCheckHook
52 scipy
53 ];
54
55 pythonImportsCheck = [ "asdf_astropy" ];
56
57 preCheck = ''
58 export HOME=$(mktemp -d)
59 '';
60
61 meta = with lib; {
62 description = "Extension library for ASDF to provide support for Astropy";
63 homepage = "https://github.com/astropy/asdf-astropy";
64 changelog = "https://github.com/astropy/asdf-astropy/blob/${src.tag}/CHANGES.rst";
65 license = licenses.bsd3;
66 maintainers = with maintainers; [ fab ];
67 };
68}