summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/segno/default.nix
blob: 58b621416aff3f7d059f5aaa3338172ef2e650c3 (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
48
49
50
51
52
53
54
55
56
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pythonOlder,

  # build-system
  flit-core,

  # dependencies
  importlib-metadata,

  # tests
  pytestCheckHook,
  pypng,
  pyzbar,
}:

buildPythonPackage rec {
  pname = "segno";
  version = "1.6.6";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "heuer";
    repo = "segno";
    tag = version;
    hash = "sha256-A6lESmVogypit0SDeG4g9axn3+welSqTt1A17BNLmvU=";
  };

  nativeBuildInputs = [ flit-core ];

  propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [ importlib-metadata ];

  nativeCheckInputs = [
    pytestCheckHook
    pypng
    pyzbar
  ];

  disabledTests = [
    # https://github.com/heuer/segno/issues/132
    "test_plugin"
  ];

  pythonImportsCheck = [ "segno" ];

  meta = {
    changelog = "https://github.com/heuer/segno/releases/tag/${src.tag}";
    description = "QR Code and Micro QR Code encoder";
    mainProgram = "segno";
    homepage = "https://github.com/heuer/segno/";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ phaer ];
  };
}