1{
2 lib,
3 buildPythonPackage,
4 callPackage,
5 fetchFromGitHub,
6 flit-core,
7 unittestCheckHook,
8
9 # important downstream dependencies
10 flit,
11 black,
12 mypy,
13 setuptools-scm,
14}:
15
16buildPythonPackage rec {
17 pname = "tomli";
18 version = "2.0.1";
19 format = "pyproject";
20
21 src = fetchFromGitHub {
22 owner = "hukkin";
23 repo = pname;
24 rev = version;
25 hash = "sha256-v0ZMrHIIaGeORwD4JiBeLthmnKZODK5odZVL0SY4etA=";
26 };
27
28 nativeBuildInputs = [ flit-core ];
29
30 nativeCheckInputs = [ unittestCheckHook ];
31
32 pythonImportsCheck = [ "tomli" ];
33
34 passthru.tests = {
35 # test downstream dependencies
36 inherit
37 flit
38 black
39 mypy
40 setuptools-scm
41 ;
42 };
43
44 meta = with lib; {
45 description = "Python library for parsing TOML, fully compatible with TOML v1.0.0";
46 homepage = "https://github.com/hukkin/tomli";
47 license = licenses.mit;
48 maintainers = with maintainers; [ veehaitch ];
49 };
50}