Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 61 lines 1.7 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, pkg-config 5, cmake 6, python3 7}: 8 9stdenv.mkDerivation rec { 10 pname = "zxing-cpp"; 11 version = "1.4.0"; 12 13 src = fetchFromGitHub { 14 owner = "nu-book"; 15 repo = pname; 16 rev = "v${version}"; 17 hash = "sha256-MTu8tvJXpo6+Z0aSIZ27nmerNtNBOwnL/jDkGedIiM8="; 18 }; 19 20 nativeBuildInputs = [ 21 cmake 22 pkg-config 23 ]; 24 25 cmakeFlags = [ 26 "-DBUILD_EXAMPLES=OFF" 27 "-DBUILD_BLACKBOX_TESTS=OFF" 28 ]; 29 30 # https://github.com/nu-book/zxing-cpp/issues/335 31 postPatch = '' 32 substituteInPlace CMakeLists.txt \ 33 --replace 'configure_file(zxing.pc.in' \ 34 'include(GNUInstallDirs) 35 configure_file(zxing.pc.in' 36 substituteInPlace zxing.pc.in \ 37 --replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \ 38 --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@ 39 ''; 40 41 passthru.tests = { 42 inherit (python3.pkgs) zxing_cpp; 43 }; 44 45 meta = with lib; { 46 homepage = "https://github.com/nu-book/zxing-cpp"; 47 description = "C++ port of zxing (a Java barcode image processing library)"; 48 longDescription = '' 49 ZXing-C++ ("zebra crossing") is an open-source, multi-format 1D/2D barcode 50 image processing library implemented in C++. 51 52 It was originally ported from the Java ZXing Library but has been 53 developed further and now includes many improvements in terms of quality 54 and performance. It can both read and write barcodes in a number of 55 formats. 56 ''; 57 license = licenses.asl20; 58 maintainers = with maintainers; [ AndersonTorres ]; 59 platforms = with platforms; unix; 60 }; 61}