1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pytestCheckHook,
6 pythonOlder,
7 build,
8 hatchling,
9 tomli,
10 typing-extensions,
11}:
12
13buildPythonPackage rec {
14 pname = "hatch-fancy-pypi-readme";
15 version = "25.1.0";
16 format = "pyproject";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchPypi {
21 pname = "hatch_fancy_pypi_readme";
22 inherit version;
23 hash = "sha256-nFjtPf+Q1R9DQUzjcAmtHVsPCP/J/CFpmKBjgPAcAEU=";
24 };
25
26 nativeBuildInputs = [ hatchling ];
27
28 propagatedBuildInputs = [
29 hatchling
30 ]
31 ++ lib.optionals (pythonOlder "3.11") [ tomli ]
32 ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ];
33
34 nativeCheckInputs = [
35 build
36 pytestCheckHook
37 ];
38
39 # Requires network connection
40 disabledTests = [
41 "test_build" # Requires internet
42 "test_invalid_config"
43 ];
44
45 pythonImportsCheck = [ "hatch_fancy_pypi_readme" ];
46
47 meta = with lib; {
48 description = "Fancy PyPI READMEs with Hatch";
49 mainProgram = "hatch-fancy-pypi-readme";
50 homepage = "https://github.com/hynek/hatch-fancy-pypi-readme";
51 license = licenses.mit;
52 maintainers = with maintainers; [ tjni ];
53 };
54}