2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
callPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
flit-core,
|
|
|
|
unittestCheckHook,
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
# important downstream dependencies
|
2024-06-05 15:53:02 +00:00
|
|
|
flit,
|
|
|
|
black,
|
|
|
|
mypy,
|
|
|
|
setuptools-scm,
|
2021-07-21 07:28:18 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tomli";
|
2022-04-15 01:41:22 +00:00
|
|
|
version = "2.0.1";
|
2021-07-21 07:28:18 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hukkin";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-v0ZMrHIIaGeORwD4JiBeLthmnKZODK5odZVL0SY4etA=";
|
2021-07-21 07:28:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ flit-core ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ unittestCheckHook ];
|
2021-07-21 07:28:18 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
pythonImportsCheck = [ "tomli" ];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
passthru.tests = {
|
2022-04-15 01:41:22 +00:00
|
|
|
# test downstream dependencies
|
2024-06-05 15:53:02 +00:00
|
|
|
inherit
|
|
|
|
flit
|
|
|
|
black
|
|
|
|
mypy
|
|
|
|
setuptools-scm
|
|
|
|
;
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Python library for parsing TOML, fully compatible with TOML v1.0.0";
|
2021-07-21 07:28:18 +00:00
|
|
|
homepage = "https://github.com/hukkin/tomli";
|
|
|
|
license = licenses.mit;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ veehaitch ];
|
2021-07-21 07:28:18 +00:00
|
|
|
};
|
|
|
|
}
|