My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/python-modules/tomli/default.nix

48 lines
968 B

{ lib
, buildPythonPackage
, callPackage
, fetchFromGitHub
, flit-core
, python
# important downstream dependencies
, flit
, black
, mypy
, setuptools-scm
}:
buildPythonPackage rec {
pname = "tomli";
version = "2.0.1";
format = "pyproject";
src = fetchFromGitHub {
owner = "hukkin";
repo = pname;
rev = version;
sha256 = "sha256-v0ZMrHIIaGeORwD4JiBeLthmnKZODK5odZVL0SY4etA=";
};
nativeBuildInputs = [ flit-core ];
pythonImportsCheck = [ "tomli" ];
checkPhase = ''
runHook preCheck
${python.interpreter} -m unittest discover
runHook postCheck
'';
passthru.tests = {
# test downstream dependencies
inherit flit black mypy setuptools-scm;
};
meta = with lib; {
description = "A Python library for parsing TOML, fully compatible with TOML v1.0.0";
homepage = "https://github.com/hukkin/tomli";
license = licenses.mit;
maintainers = with maintainers; [ veehaitch SuperSandro2000 ];
};
}