nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 meson,
6 ninja,
7 pkg-config,
8 desktop-file-utils,
9 gtk3,
10 libpng,
11 exiv2,
12 lcms,
13 intltool,
14 gettext,
15 shared-mime-info,
16 glib,
17 gdk-pixbuf,
18 perl,
19 wrapGAppsHook3,
20 webp-pixbuf-loader,
21 gnome,
22 librsvg,
23}:
24
25stdenv.mkDerivation {
26 pname = "viewnior-gtk3";
27 version = "1.8-unstable-2023-11-23";
28
29 src = fetchFromGitHub {
30 #owner = "hellosiyan";
31 #repo = "Viewnior";
32 owner = "Artturin";
33 repo = "Viewnior";
34 # https://github.com/hellosiyan/Viewnior/pull/142
35 rev = "23ce6e5630b24509d8009f17a833ad9e59b85fab";
36 hash = "sha256-+/f0+og1Dd7eJK7P83+q4lf4SjzW2g6qNk8ZTxNAuDA=";
37 };
38
39 nativeBuildInputs = [
40 meson
41 ninja
42 pkg-config
43 desktop-file-utils
44 intltool
45 gettext
46 wrapGAppsHook3
47 ];
48
49 buildInputs = [
50 gtk3
51 libpng
52 exiv2
53 lcms
54 shared-mime-info
55 glib
56 gdk-pixbuf
57 perl
58 ];
59
60 postInstall = ''
61 export GDK_PIXBUF_MODULE_FILE="${
62 gnome._gdkPixbufCacheBuilder_DO_NOT_USE {
63 extraLoaders = [
64 webp-pixbuf-loader
65 librsvg
66 ];
67 }
68 }"
69
70 # gtk3 viewnior can be launched in wayland mode and does so by default
71 # but moving around in a zoomed in image doesn't work
72 gappsWrapperArgs+=(
73 --set-default GDK_BACKEND x11
74 )
75 '';
76
77 meta = with lib; {
78 description = "Fast and simple image viewer";
79 longDescription = ''
80 Viewnior is insipred by big projects like Eye of Gnome, because of it's
81 usability and richness,and by GPicView, because of it's lightweight design and
82 minimal interface. So here comes Viewnior - small and light, with no compromise
83 with the quality of it's functions. The program is made with better integration
84 in mind (follows Gnome HIG2).
85 '';
86 license = licenses.gpl3;
87 homepage = "https://siyanpanayotov.com/project/viewnior/";
88 maintainers = with maintainers; [
89 smironov
90 artturin
91 ];
92 platforms = platforms.gnu ++ platforms.linux;
93 mainProgram = "viewnior";
94 };
95}