about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/tomli/default.nix
blob: 8f96a82ad6b8fb91eaeaf1d11060efd7b7605829 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ lib
, buildPythonPackage
, callPackage
, fetchFromGitHub
, flit-core
, unittestCheckHook

  # 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;
    hash = "sha256-v0ZMrHIIaGeORwD4JiBeLthmnKZODK5odZVL0SY4etA=";
  };

  nativeBuildInputs = [ flit-core ];

  nativeCheckInputs = [ unittestCheckHook ];

  pythonImportsCheck = [ "tomli" ];

  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 ];
  };
}