1{ lib
2, stdenv
3, fetchFromGitHub
4, pkg-config
5, cmake
6}:
7
8stdenv.mkDerivation rec {
9 pname = "zxing-cpp";
10 version = "1.1.1";
11
12 src = fetchFromGitHub {
13 owner = "nu-book";
14 repo = pname;
15 rev = "v${version}";
16 hash = "sha256-N2FTzsjxm3EE5Wqz7xt+FS4zQ60Ow4WbdX6Eo08ktek=";
17 };
18
19 nativeBuildInputs = [
20 cmake
21 pkg-config
22 ];
23
24 cmakeFlags = [
25 "-DBUILD_EXAMPLES=OFF"
26 ];
27
28 meta = with lib; {
29 homepage = "https://github.com/nu-book/zxing-cpp";
30 description = "C++ port of zxing (a Java barcode image processing library)";
31 longDescription = ''
32 ZXing-C++ ("zebra crossing") is an open-source, multi-format 1D/2D barcode
33 image processing library implemented in C++.
34
35 It was originally ported from the Java ZXing Library but has been
36 developed further and now includes many improvements in terms of quality
37 and performance. It can both read and write barcodes in a number of
38 formats.
39 '';
40 license = licenses.asl20;
41 maintainers = with maintainers; [ AndersonTorres ];
42 platforms = with platforms; unix;
43 };
44}