1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 7 # build-system 8 flit-core, 9 10 # dependencies 11 importlib-metadata, 12 13 # tests 14 pytestCheckHook, 15 pypng, 16 pyzbar, 17}: 18 19buildPythonPackage rec { 20 pname = "segno"; 21 version = "1.6.6"; 22 pyproject = true; 23 24 src = fetchFromGitHub { 25 owner = "heuer"; 26 repo = "segno"; 27 tag = version; 28 hash = "sha256-A6lESmVogypit0SDeG4g9axn3+welSqTt1A17BNLmvU="; 29 }; 30 31 nativeBuildInputs = [ flit-core ]; 32 33 propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [ importlib-metadata ]; 34 35 nativeCheckInputs = [ 36 pytestCheckHook 37 pypng 38 pyzbar 39 ]; 40 41 disabledTests = [ 42 # https://github.com/heuer/segno/issues/132 43 "test_plugin" 44 ]; 45 46 pythonImportsCheck = [ "segno" ]; 47 48 meta = with lib; { 49 changelog = "https://github.com/heuer/segno/releases/tag/${src.tag}"; 50 description = "QR Code and Micro QR Code encoder"; 51 mainProgram = "segno"; 52 homepage = "https://github.com/heuer/segno/"; 53 license = licenses.bsd3; 54 maintainers = with maintainers; [ phaer ]; 55 }; 56}