1{ lib 2, buildPythonPackage 3, callPackage 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.0.1"; 18 format = "pyproject"; 19 20 src = fetchFromGitHub { 21 owner = "hukkin"; 22 repo = pname; 23 rev = version; 24 hash = "sha256-v0ZMrHIIaGeORwD4JiBeLthmnKZODK5odZVL0SY4etA="; 25 }; 26 27 nativeBuildInputs = [ flit-core ]; 28 29 nativeCheckInputs = [ unittestCheckHook ]; 30 31 pythonImportsCheck = [ "tomli" ]; 32 33 passthru.tests = { 34 # test downstream dependencies 35 inherit flit black mypy setuptools-scm; 36 }; 37 38 meta = with lib; { 39 description = "A Python library for parsing TOML, fully compatible with TOML v1.0.0"; 40 homepage = "https://github.com/hukkin/tomli"; 41 license = licenses.mit; 42 maintainers = with maintainers; [ veehaitch ]; 43 }; 44}