about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/zxing-cpp
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-09-15 07:58:52 +0000
committerAlyssa Ross <hi@alyssa.is>2023-09-15 07:58:52 +0000
commit9d1daa60832979d5d361dfdac136fb9e5a1af2c5 (patch)
tree5192dd85903cb092cf7dff0e3403387b3b683d84 /nixpkgs/pkgs/development/libraries/zxing-cpp
parent67cdfc7d42f721bf85814af5a0095fb9f9ea455d (diff)
parentf2ea252d23ebc9a5336bf6a61e0644921f64e67c (diff)
downloadnixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.tar
nixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.tar.gz
nixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.tar.bz2
nixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.tar.lz
nixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.tar.xz
nixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.tar.zst
nixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.zip
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/zxing-cpp')
-rw-r--r--nixpkgs/pkgs/development/libraries/zxing-cpp/default.nix47
1 files changed, 21 insertions, 26 deletions
diff --git a/nixpkgs/pkgs/development/libraries/zxing-cpp/default.nix b/nixpkgs/pkgs/development/libraries/zxing-cpp/default.nix
index bcddfa96552f..9cd78b7b56a1 100644
--- a/nixpkgs/pkgs/development/libraries/zxing-cpp/default.nix
+++ b/nixpkgs/pkgs/development/libraries/zxing-cpp/default.nix
@@ -1,20 +1,21 @@
 { lib
 , stdenv
 , fetchFromGitHub
-, pkg-config
 , cmake
+, pkg-config
 , python3
+, gitUpdater
 }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "zxing-cpp";
-  version = "1.4.0";
+  version = "2.1.0";
 
   src = fetchFromGitHub {
-    owner = "nu-book";
-    repo = pname;
-    rev = "v${version}";
-    hash = "sha256-MTu8tvJXpo6+Z0aSIZ27nmerNtNBOwnL/jDkGedIiM8=";
+    owner = "zxing-cpp";
+    repo = "zxing-cpp";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-B/jGsHImRfj0iEio2b6R6laWBI1LL3OI407O7sren8s=";
   };
 
   nativeBuildInputs = [
@@ -27,23 +28,17 @@ stdenv.mkDerivation rec {
     "-DBUILD_BLACKBOX_TESTS=OFF"
   ];
 
-  # https://github.com/nu-book/zxing-cpp/issues/335
-  postPatch = ''
-    substituteInPlace CMakeLists.txt \
-      --replace 'configure_file(zxing.pc.in' \
-                'include(GNUInstallDirs)
-                 configure_file(zxing.pc.in'
-    substituteInPlace zxing.pc.in \
-      --replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
-      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
-  '';
-
-  passthru.tests = {
-    inherit (python3.pkgs) zxing_cpp;
+  passthru = {
+    tests = {
+      inherit (python3.pkgs) zxing_cpp;
+    };
+    updateScript = gitUpdater {
+      rev-prefix = "v";
+    };
   };
 
-  meta = with lib; {
-    homepage = "https://github.com/nu-book/zxing-cpp";
+  meta = {
+    homepage = "https://github.com/zxing-cpp/zxing-cpp";
     description = "C++ port of zxing (a Java barcode image processing library)";
     longDescription = ''
       ZXing-C++ ("zebra crossing") is an open-source, multi-format 1D/2D barcode
@@ -54,8 +49,8 @@ stdenv.mkDerivation rec {
       and performance. It can both read and write barcodes in a number of
       formats.
     '';
-    license = licenses.asl20;
-    maintainers = with maintainers; [ AndersonTorres ];
-    platforms = with platforms; unix;
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ AndersonTorres lukegb ];
+    platforms = lib.platforms.unix;
   };
-}
+})