mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 23:23:07 +00:00
61 lines
1.0 KiB
Nix
61 lines
1.0 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pythonOlder
|
|
|
|
# build-system
|
|
, setuptools
|
|
|
|
# dependencies
|
|
, importlib-metadata
|
|
|
|
# tests
|
|
, pytestCheckHook
|
|
, pypng
|
|
, pyzbar
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "segno";
|
|
version = "1.6.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "heuer";
|
|
repo = "segno";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-lgitNnVHvvPLKtDqJvc/zsVlFu9Gw0D3S4lt/20TlhE=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
setuptools
|
|
];
|
|
|
|
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 = with lib; {
|
|
changelog = "https://github.com/heuer/segno/releases/tag/${version}";
|
|
description = "QR Code and Micro QR Code encoder";
|
|
homepage = "https://github.com/heuer/segno/";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ phaer ];
|
|
};
|
|
}
|