summary refs log tree commit diff
path: root/pkgs/development/python-modules/zxing_cpp/default.nix
blob: 9c43844888c9a9e8c769e9e75606d5f70ef7c7da (plain) (blame)
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
{ buildPythonPackage
, lib
, cmake
, pybind11
, zxing-cpp
, numpy
, pillow
}:

buildPythonPackage rec {
  pname = "zxing_cpp";
  inherit (zxing-cpp) src version;

  sourceRoot = "source/wrappers/python";
  patches = [
    ./use-nixpkgs-pybind11.patch
  ];
  dontUseCmakeConfigure = true;

  propagatedBuildInputs = [
    pybind11
    numpy
  ];

  nativeBuildInputs = [
    cmake
  ];

  nativeCheckInputs = [
    pillow
  ];

  meta = with lib; {
    homepage = "https://github.com/zxing-cpp/zxing-cpp";
    description = "Python bindings for C++ port of zxing (a Java barcode image processing library)";
    longDescription = ''
      ZXing-C++ ("zebra crossing") is an open-source, multi-format 1D/2D barcode
      image processing library implemented in C++.

      It was originally ported from the Java ZXing Library but has been
      developed further and now includes many improvements in terms of quality
      and performance. It can both read and write barcodes in a number of
      formats.
    '';
    license = licenses.asl20;
    maintainers = with maintainers; [ lukegb ];
    platforms = with platforms; unix;
  };
}