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