summaryrefslogtreecommitdiffstats
path: root/pkgs/development/python-modules/autopage/default.nix
blob: c2ded3eb134c70166c876587c202855794ccce20 (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
47
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  fixtures,
  less,
  pytestCheckHook,
}:

buildPythonPackage (finalAttrs: {
  pname = "autopage";
  version = "0.6.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "zaneb";
    repo = "autopage";
    tag = "v${finalAttrs.version}";
    hash = "sha256-oBZoGVvgUhrfcEUvmhIN7Wnsv+SvkC553LAhHGCVIBQ=";
  };

  build-system = [ setuptools ];

  nativeCheckInputs = [
    fixtures
    less
    pytestCheckHook
  ]
  ++ fixtures.optional-dependencies.streams;

  disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
    # https://github.com/zaneb/autopage/issues/7
    "test_end_to_end"
  ];

  pythonImportsCheck = [ "autopage" ];

  meta = {
    changelog = "https://github.com/zaneb/autopage/releases/tag/${finalAttrs.src.tag}";
    description = "Library to provide automatic paging for console output";
    homepage = "https://github.com/zaneb/autopage";
    license = lib.licenses.asl20;
    teams = [ lib.teams.openstack ];
  };
})