2021-07-19 15:39:43 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-08-27 01:34:32 +01:00
|
|
|
, callPackage
|
2021-07-19 15:39:43 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, flit-core
|
2022-03-05 19:53:04 +00:00
|
|
|
, python
|
2022-02-02 17:46:53 +00:00
|
|
|
|
|
|
|
# important downstream dependencies
|
|
|
|
, flit
|
|
|
|
, black
|
|
|
|
, mypy
|
|
|
|
, setuptools-scm
|
2021-07-19 15:39:43 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tomli";
|
2022-03-05 19:53:04 +00:00
|
|
|
version = "2.0.1";
|
2021-07-19 15:39:43 +01:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hukkin";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-03-05 19:53:04 +00:00
|
|
|
sha256 = "sha256-v0ZMrHIIaGeORwD4JiBeLthmnKZODK5odZVL0SY4etA=";
|
2021-07-19 15:39:43 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ flit-core ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "tomli" ];
|
|
|
|
|
2022-03-05 19:53:04 +00:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
${python.interpreter} -m unittest discover
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
2021-08-27 01:34:32 +01:00
|
|
|
|
|
|
|
passthru.tests = {
|
2022-03-05 19:53:04 +00:00
|
|
|
# test downstream dependencies
|
2022-02-02 17:46:53 +00:00
|
|
|
inherit flit black mypy setuptools-scm;
|
2021-08-27 01:34:32 +01:00
|
|
|
};
|
|
|
|
|
2021-07-19 15:39:43 +01:00
|
|
|
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;
|
2021-08-27 01:34:32 +01:00
|
|
|
maintainers = with maintainers; [ veehaitch SuperSandro2000 ];
|
2021-07-19 15:39:43 +01:00
|
|
|
};
|
|
|
|
}
|