zint: 2.13.0 -> 2.15.0 (#395614)

This commit is contained in:
Azat Bahawi
2025-04-11 08:35:01 +00:00
committed by GitHub
2 changed files with 41 additions and 31 deletions
@@ -2,43 +2,60 @@
lib,
stdenv,
fetchFromGitHub,
wrapQtAppsHook,
cmake,
qtbase,
qtsvg,
qttools,
testers,
zint,
ninja,
libpng,
qt6,
versionCheckHook,
zlib,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "zint";
version = "2.13.0";
version = "2.15.0";
outputs = [
"out"
"lib"
"dev"
];
src = fetchFromGitHub {
owner = "zint";
repo = "zint";
rev = version;
hash = "sha256-/ILq/7A8Lffe2NuiABiV3KeYXapuL1SO55Qk3wXfC/8=";
tag = finalAttrs.version;
hash = "sha256-+dXIU66HIS2mE0pa99UemMMFBGCYjupUX8P7q3G7Nis=";
};
outputs = [
"out"
"dev"
];
postPatch = ''
# Fix cmake file installation
# https://github.com/zint/zint/pull/8
substituteInPlace CMakeLists.txt \
--replace-fail 'DESTINATION "''${CMAKE_INSTALL_DATADIR}/zint"' 'DESTINATION lib/cmake/zint'
substituteInPlace backend/CMakeLists.txt \
--replace-fail 'DESTINATION "''${CMAKE_INSTALL_DATADIR}/zint"' 'DESTINATION lib/cmake/zint'
'';
nativeBuildInputs = [
cmake
wrapQtAppsHook
ninja
qt6.wrapQtAppsHook
];
buildInputs = [
qtbase
qtsvg
qttools
qt6.qtbase
qt6.qtsvg
qt6.qttools
];
cmakeFlags = [ "-DZINT_QT6:BOOL=ON" ];
propagatedBuildInputs = [
libpng
zlib
];
cmakeFlags = [ (lib.cmakeBool "ZINT_QT6" true) ];
doInstallCheck = true;
nativeCheckInputs = [ versionCheckHook ];
postInstall = ''
install -Dm644 -t $out/share/applications $src/zint-qt.desktop
@@ -46,12 +63,6 @@ stdenv.mkDerivation rec {
install -Dm644 -t $out/share/icons/hicolor/scalable/apps $src/frontend_qt/images/scalable/zint-qt.svg
'';
passthru.tests.version = testers.testVersion {
package = zint;
command = "zint --version";
inherit version;
};
meta = with lib; {
description = "Barcode generating tool and library";
longDescription = ''
@@ -61,9 +72,10 @@ stdenv.mkDerivation rec {
developers access to the capabilities of Zint.
'';
homepage = "https://www.zint.org.uk";
changelog = "https://github.com/zint/zint/blob/${version}/ChangeLog";
changelog = "https://github.com/zint/zint/blob/${finalAttrs.src.rev}/ChangeLog";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ azahi ];
maintainers = [ lib.maintainers.azahi ];
platforms = platforms.all;
mainProgram = "zint";
};
}
})
-2
View File
@@ -5750,8 +5750,6 @@ with pkgs;
zpaq = callPackage ../tools/archivers/zpaq { };
zpaqd = callPackage ../tools/archivers/zpaq/zpaqd.nix { };
zint = qt6Packages.callPackage ../development/libraries/zint { };
zstd = callPackage ../tools/compression/zstd {
cmake = buildPackages.cmakeMinimal;
};