at 22.05-pre 980 B view raw
1{ lib 2, buildPythonPackage 3, callPackage 4, fetchFromGitHub 5, flit-core 6}: 7 8buildPythonPackage rec { 9 pname = "tomli"; 10 version = "1.2.1"; 11 format = "pyproject"; 12 13 outputs = [ 14 "out" 15 "testsout" 16 ]; 17 18 src = fetchFromGitHub { 19 owner = "hukkin"; 20 repo = pname; 21 rev = version; 22 sha256 = "sha256-30AQ9MQmclcjl1d83mIoxFXzaJn1OFKQlVxayqC5NxY="; 23 }; 24 25 nativeBuildInputs = [ flit-core ]; 26 27 postInstall = '' 28 mkdir $testsout 29 cp -R benchmark/ pyproject.toml tests/ $testsout/ 30 ''; 31 32 pythonImportsCheck = [ "tomli" ]; 33 34 # check in passthru.tests.pytest to escape infinite recursion with setuptools-scm 35 doCheck = false; 36 37 passthru.tests = { 38 pytest = callPackage ./tests.nix { }; 39 }; 40 41 meta = with lib; { 42 description = "A Python library for parsing TOML, fully compatible with TOML v1.0.0"; 43 homepage = "https://github.com/hukkin/tomli"; 44 license = licenses.mit; 45 maintainers = with maintainers; [ veehaitch SuperSandro2000 ]; 46 }; 47}