quirc: 2021-10-08 -> 1.2

Diff: https://github.com/dlbeer/quirc/compare/v2021-10-08...v1.2

authored by Robert Schütz and committed by Weijia Wang 6b0feb7f 32146f31

+21 -16
+2 -2
pkgs/tools/graphics/quirc/0001-dont-build-demos.patch
··· 4 4 +++ b/Makefile 5 5 @@ -37,7 +37,7 @@ DEMO_UTIL_OBJ = \ 6 6 7 - OPENCV_CFLAGS != pkg-config --cflags opencv4 8 - OPENCV_LIBS != pkg-config --libs opencv4 7 + OPENCV_CFLAGS := $(shell pkg-config --cflags opencv4 2>&1) 8 + OPENCV_LIBS = $(shell pkg-config --libs opencv4) 9 9 -QUIRC_CXXFLAGS = $(QUIRC_CFLAGS) $(OPENCV_CFLAGS) --std=c++17 10 10 +QUIRC_CXXFLAGS = $(QUIRC_CFLAGS) --std=c++17 11 11
+19 -14
pkgs/tools/graphics/quirc/default.nix
··· 1 1 { lib, stdenv, fetchFromGitHub, SDL_gfx, SDL, libjpeg, libpng, opencv 2 2 , pkg-config }: 3 3 4 - stdenv.mkDerivation { 4 + stdenv.mkDerivation (finalAttrs: { 5 5 pname = "quirc"; 6 - version = "2021-10-08"; 6 + version = "1.2"; 7 7 8 8 src = fetchFromGitHub { 9 9 owner = "dlbeer"; 10 10 repo = "quirc"; 11 - rev = "516d91a94d880ca1006fc1d57f318bdff8411f0d"; 12 - sha256 = "0jkaz5frm6jr9bxyfympvzh180nczrfvvb3z3qhk21djlas6nr5f"; 11 + rev = "v${finalAttrs.version}"; 12 + hash = "sha256-zdq/YKL33jJXa10RqmQIl06rRYnrthWG+umT4dipft0="; 13 13 }; 14 + 15 + postPatch = '' 16 + # don't try to change ownership 17 + substituteInPlace Makefile \ 18 + --replace-fail "-o root" "" \ 19 + --replace-fail "-g root" "" 20 + ''; 14 21 15 22 nativeBuildInputs = [ pkg-config ]; 16 23 buildInputs = [ SDL SDL_gfx libjpeg libpng opencv ]; ··· 28 35 runHook postBuild 29 36 ''; 30 37 31 - configurePhase = '' 32 - runHook preConfigure 33 - 34 - # don't try to change ownership 35 - sed -e 's/-[og] root//g' -i Makefile 36 - 37 - runHook postConfigure 38 - ''; 39 - 40 38 preInstall = '' 41 39 mkdir -p "$out"/{bin,lib,include} 42 40 ··· 44 42 find -maxdepth 1 -type f -executable ! -name '*.so.*' | xargs cp -t "$out"/bin 45 43 ''; 46 44 45 + postInstall = '' 46 + # don't install static library 47 + rm $out/lib/libquirc.a 48 + 49 + ln -s $out/lib/libquirc.so.* $out/lib/libquirc.so 50 + ''; 51 + 47 52 meta = { 48 53 description = "A small QR code decoding library"; 49 54 license = lib.licenses.isc; 50 55 maintainers = [ lib.maintainers.raskin ]; 51 56 platforms = lib.platforms.linux ++ [ "x86_64-darwin" "aarch64-darwin" ]; 52 57 }; 53 - } 58 + })