nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 qt6,
6 nix-update-script,
7 kdePackages,
8 x11Support ? true,
9}:
10
11stdenv.mkDerivation (finalAttrs: {
12 pname = "qview";
13 version = "7.1";
14
15 src = fetchFromGitHub {
16 owner = "jurplel";
17 repo = "qView";
18 tag = finalAttrs.version;
19 hash = "sha256-EcXhwJcgBLdXa/FQ5LuENlzwnLw4Gt2BGlBO1p5U8tI=";
20 };
21
22 nativeBuildInputs = [
23 qt6.qmake
24 qt6.wrapQtAppsHook
25 ];
26
27 buildInputs = [
28 qt6.qtbase
29 qt6.qttools
30 qt6.qtimageformats
31 qt6.qtsvg
32 kdePackages.kimageformats
33 ];
34
35 qmakeFlags = [
36 # See https://github.com/NixOS/nixpkgs/issues/214765
37 "QT_TOOL.lrelease.binary=${lib.getDev qt6.qttools}/bin/lrelease"
38 ]
39 ++ lib.optionals (!x11Support) [ "CONFIG+=NO_X11" ];
40
41 passthru.updateScript = nix-update-script { };
42
43 meta = {
44 description = "Practical and minimal image viewer";
45 mainProgram = "qview";
46 changelog = "https://github.com/jurplel/qView/releases/tag/${finalAttrs.version}";
47 homepage = "https://interversehq.com/qview/";
48 license = lib.licenses.gpl3Plus;
49 maintainers = with lib.maintainers; [ acowley ];
50 platforms = lib.platforms.all;
51 };
52})