2022-07-14 12:49:19 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2024-01-13 08:15:51 +00:00
|
|
|
, pythonOlder
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
# build-system
|
2024-04-21 15:54:59 +00:00
|
|
|
, flit-core
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
# dependencies
|
|
|
|
, importlib-metadata
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# tests
|
2022-07-14 12:49:19 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pypng
|
|
|
|
, pyzbar
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "segno";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.6.1";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "heuer";
|
|
|
|
repo = "segno";
|
2024-01-13 08:15:51 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-5CDrQhbgUydz1ORp4ktZwhcgbJxQq1snKIAA0v4mZ00=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
flit-core
|
2023-11-16 04:20:00 +00:00
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-07-14 12:49:19 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pypng
|
|
|
|
pyzbar
|
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
disabledTests = [
|
|
|
|
# https://github.com/heuer/segno/issues/132
|
|
|
|
"test_plugin"
|
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"segno"
|
|
|
|
];
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-11-16 04:20:00 +00:00
|
|
|
changelog = "https://github.com/heuer/segno/releases/tag/${version}";
|
2022-07-14 12:49:19 +00:00
|
|
|
description = "QR Code and Micro QR Code encoder";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "segno";
|
2022-07-14 12:49:19 +00:00
|
|
|
homepage = "https://github.com/heuer/segno/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ phaer ];
|
|
|
|
};
|
|
|
|
}
|