2022-07-14 12:49:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, wrapQtAppsHook
|
|
|
|
, cmake
|
|
|
|
, qtbase
|
2022-09-09 14:08:57 +00:00
|
|
|
, qtsvg
|
2022-07-14 12:49:19 +00:00
|
|
|
, qttools
|
2022-09-09 14:08:57 +00:00
|
|
|
, testers
|
|
|
|
, zint
|
2022-07-14 12:49:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "zint";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "2.12.0";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-09-09 14:08:57 +00:00
|
|
|
owner = "zint";
|
2022-07-14 12:49:19 +00:00
|
|
|
repo = "zint";
|
|
|
|
rev = version;
|
2023-02-09 11:40:11 +00:00
|
|
|
hash = "sha256-Ay6smir6zUpadmw1WpU+F7e9t7Gk3JNVtf2VVu92bDk=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake wrapQtAppsHook ];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
buildInputs = [ qtbase qtsvg qttools ];
|
|
|
|
|
|
|
|
cmakeFlags = [ "-DZINT_QT6:BOOL=ON" ];
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2022-09-09 14:08:57 +00:00
|
|
|
install -Dm644 -t $out/share/applications $src/zint-qt.desktop
|
|
|
|
install -Dm644 -t $out/share/pixmaps $src/zint-qt.png
|
|
|
|
install -Dm644 -t $out/share/icons/hicolor/scalable/apps $src/frontend_qt/images/scalable/zint-qt.svg
|
2022-07-14 12:49:19 +00:00
|
|
|
'';
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = zint;
|
|
|
|
command = "zint --version";
|
|
|
|
inherit version;
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A barcode generating tool and library";
|
|
|
|
longDescription = ''
|
|
|
|
The Zint project aims to provide a complete cross-platform open source
|
|
|
|
barcode generating solution. The package currently consists of a Qt based
|
|
|
|
GUI, a CLI command line executable and a library with an API to allow
|
|
|
|
developers access to the capabilities of Zint.
|
|
|
|
'';
|
2022-09-09 14:08:57 +00:00
|
|
|
homepage = "https://www.zint.org.uk";
|
|
|
|
changelog = "https://github.com/zint/zint/blob/${version}/ChangeLog";
|
2022-07-14 12:49:19 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ azahi ];
|
2023-10-09 19:29:22 +00:00
|
|
|
platforms = platforms.all;
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
}
|