nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, asdf-standard
3, asdf-transform-schemas
4, astropy
5, buildPythonPackage
6, fetchPypi
7, importlib-resources
8, jmespath
9, jsonschema
10, lz4
11, numpy
12, packaging
13, pytest-astropy
14, pytestCheckHook
15, pythonOlder
16, pyyaml
17, semantic-version
18, setuptools-scm
19}:
20
21buildPythonPackage rec {
22 pname = "asdf";
23 version = "2.11.1";
24 format = "pyproject";
25
26 disabled = pythonOlder "3.7";
27
28 src = fetchPypi {
29 inherit pname version;
30 hash = "sha256-1uDRoS9nyZCLPdbiAQBADoiwqaVBzj1NMpZXdJQYoxQ=";
31 };
32
33 nativeBuildInputs = [
34 setuptools-scm
35 ];
36
37 propagatedBuildInputs = [
38 asdf-standard
39 asdf-transform-schemas
40 jmespath
41 jsonschema
42 numpy
43 packaging
44 pyyaml
45 semantic-version
46 ] ++ lib.optionals (pythonOlder "3.9") [
47 importlib-resources
48 ];
49
50 checkInputs = [
51 astropy
52 lz4
53 pytest-astropy
54 pytestCheckHook
55 ];
56
57 preCheck = ''
58 export PY_IGNORE_IMPORTMISMATCH=1
59 '';
60
61 pythonImportsCheck = [
62 "asdf"
63 ];
64
65 meta = with lib; {
66 description = "Python tools to handle ASDF files";
67 homepage = "https://github.com/asdf-format/asdf";
68 license = licenses.bsd3;
69 maintainers = with maintainers; [ costrouc ];
70 };
71}