summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/argh/default.nix
blob: d2fee605d42c6b421f2e67a49c382f149b854d50 (plain)
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
45
46
{
  lib,
  buildPythonPackage,
  fetchPypi,
  flit-core,
  iocapture,
  mock,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "argh";
  version = "0.31.3";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-8wAj2L4Uyl7msbPuq4KRUde72kZK4H3E3VNHkZxYkvk=";
  };

  patches = [
    # python3.14 introduced a breaking change which caused a test to fail. A
    # fix has been commited upstream in a pull request by the author, but has
    # since been kept unmerged
    # https://github.com/neithere/argh/pull/240
    ./pr240-699568ad-06-01-2025-test_integration.patch
  ];

  nativeBuildInputs = [ flit-core ];

  nativeCheckInputs = [
    iocapture
    mock
    pytestCheckHook
  ];

  pythonImportsCheck = [ "argh" ];

  meta = {
    changelog = "https://github.com/neithere/argh/blob/v${version}/CHANGES";
    homepage = "https://github.com/neithere/argh";
    description = "Unobtrusive argparse wrapper with natural syntax";
    license = lib.licenses.lgpl3Plus;
    maintainers = [ ];
  };
}