nixpkgs/pkgs/development/python-modules/tomli/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
968 B
Nix
Raw Normal View History

2021-07-19 15:39:43 +01:00
{ lib
, buildPythonPackage
, callPackage
2021-07-19 15:39:43 +01:00
, fetchFromGitHub
, flit-core
, python
# important downstream dependencies
, flit
, black
, mypy
, setuptools-scm
2021-07-19 15:39:43 +01:00
}:
buildPythonPackage rec {
pname = "tomli";
version = "2.0.1";
2021-07-19 15:39:43 +01:00
format = "pyproject";
src = fetchFromGitHub {
owner = "hukkin";
repo = pname;
rev = version;
sha256 = "sha256-v0ZMrHIIaGeORwD4JiBeLthmnKZODK5odZVL0SY4etA=";
2021-07-19 15:39:43 +01:00
};
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;
};
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;
maintainers = with maintainers; [ veehaitch SuperSandro2000 ];
2021-07-19 15:39:43 +01:00
};
}