nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 48 lines 968 B view raw
1{ lib 2, buildPythonPackage 3, callPackage 4, fetchFromGitHub 5, flit-core 6, python 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 sha256 = "sha256-v0ZMrHIIaGeORwD4JiBeLthmnKZODK5odZVL0SY4etA="; 25 }; 26 27 nativeBuildInputs = [ flit-core ]; 28 29 pythonImportsCheck = [ "tomli" ]; 30 31 checkPhase = '' 32 runHook preCheck 33 ${python.interpreter} -m unittest discover 34 runHook postCheck 35 ''; 36 37 passthru.tests = { 38 # test downstream dependencies 39 inherit flit black mypy setuptools-scm; 40 }; 41 42 meta = with lib; { 43 description = "A Python library for parsing TOML, fully compatible with TOML v1.0.0"; 44 homepage = "https://github.com/hukkin/tomli"; 45 license = licenses.mit; 46 maintainers = with maintainers; [ veehaitch SuperSandro2000 ]; 47 }; 48}