nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 setuptools-scm,
7 pillow,
8 pytestCheckHook,
9 pytest-cov-stub,
10}:
11
12buildPythonPackage (finalAttrs: {
13 pname = "python-barcode";
14 version = "0.16.1";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "WhyNotHugo";
19 repo = "python-barcode";
20 tag = "v${finalAttrs.version}";
21 hash = "sha256-a/w2JxFBm/jqIRnqIB7ZtkdiLnBNjbR0V5SNuau/YxY=";
22 };
23
24 build-system = [
25 setuptools
26 setuptools-scm
27 ];
28
29 optional-dependencies = {
30 images = [ pillow ];
31 };
32
33 nativeCheckInputs = [
34 pytestCheckHook
35 pytest-cov-stub
36 ]
37 ++ finalAttrs.passthru.optional-dependencies.images;
38
39 pythonImportsCheck = [ "barcode" ];
40
41 meta = {
42 description = "Create standard barcodes with Python";
43 mainProgram = "python-barcode";
44 homepage = "https://github.com/WhyNotHugo/python-barcode";
45 changelog = "https://github.com/WhyNotHugo/python-barcode/blob/${finalAttrs.src.tag}/docs/changelog.rst";
46 license = lib.licenses.mit;
47 maintainers = [ ];
48 };
49})