+
+(define-public imv
+ (package
+ (name "imv")
+ (version "4.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/eXeC64/imv")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "0gk8g178i961nn3bls75a8qpv6wvfvav6hd9lxca1skaikd33zdx"))
+ (file-name (git-file-name name version))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'install 'record-absolute-file-names
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; 'imv' is a script that execs 'imv-x11' or 'imv-wayland'.
+ ;; Record their absolute file name.
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (substitute* (string-append bin "/imv")
+ (("imv-")
+ (string-append bin "/imv-")))
+ #t))))
+ #:make-flags
+ (list ,(string-append "CC=" (cc-for-target))
+ (string-append "PREFIX=" (assoc-ref %outputs "out"))
+ (string-append "CONFIGPREFIX="
+ (assoc-ref %outputs "out") "/etc"))))
+ (inputs
+ `(("asciidoc" ,asciidoc)
+ ("freeimage" ,freeimage)
+ ("glu" ,glu)
+ ("librsvg" ,librsvg)
+ ("libxkbcommon" ,libxkbcommon)
+ ("pango" ,pango)
+ ("wayland" ,wayland)))
+ (native-inputs
+ `(("cmocka" ,cmocka)
+ ("pkg-config" ,pkg-config)))
+ (synopsis "Image viewer for tiling window managers")
+ (description "@code{imv} is a command line image viewer intended for use
+with tiling window managers. Features include:
+
+@itemize
+@item Native Wayland and X11 support.
+@item Support for dozens of image formats including:
+@itemize
+@item PNG
+@item JPEG
+@item Animated GIFs
+@item SVG
+@item TIFF
+@item Various RAW formats
+@item Photoshop PSD files
+@end itemize
+@item Configurable key bindings and behavior.
+@item Highly scriptable with IPC via imv-msg.
+@end itemize\n")
+ (home-page "https://github.com/eXeC64/imv")
+ (license license:expat)))
+
+(define-public qiv
+ (package
+ (name "qiv")
+ (version "2.3.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://spiegl.de/qiv/download/qiv-"
+ version ".tgz"))
+ (sha256
+ (base32 "1rlf5h67vhj7n1y7jqkm9k115nfnzpwngj3kzqsi2lg676srclv7"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ;; That is required for testing.
+ ("xorg-server" ,xorg-server-for-tests)))
+ (inputs
+ `(("imlib2" ,imlib2)
+ ("glib" ,glib)
+ ("gtk+" ,gtk+-2)
+ ("lcms" ,lcms)
+ ("libjpeg" ,libjpeg-turbo)
+ ("libtiff" ,libtiff)
+ ("libexif" ,libexif)
+ ("libx11" ,libx11)
+ ("libxext" ,libxext)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure) ; no configure script
+ (add-before 'install 'patch-file-start-xserver
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; patch the file so that qiv runs and exits by itself
+ (substitute* "Makefile"
+ (("./qiv -f ./intro.jpg") "./qiv -f -C -s ./intro.jpg")
+ ;; Fail the build when test fails.
+ (("echo \"-- Test Failed --\"")
+ "(echo \"-- Test Failed --\" ; false)"))
+ ;; There must be a running X server and make install doesn't start one.
+ ;; Therefore we must do it.
+ (system "Xvfb :1 &")
+ (setenv "DISPLAY" ":1")
+ #t)))
+ #:tests? #f ; there is no check target
+ #:make-flags
+ (list
+ (string-append "PREFIX=" (assoc-ref %outputs "out")))))
+ (home-page "http://spiegl.de/qiv/")
+ (synopsis "Graphical image viewer for X")
+ (description
+ "Quick Image Viewer is a small and fast GDK/Imlib2 image viewer.
+Features include zoom, maxpect, scale down, fullscreen, slideshow, delete,
+brightness/contrast/gamma correction, pan with keyboard and mouse, flip,
+rotate left/right, jump/forward/backward images, filename filter and use it
+to set X desktop background.")
+ (license license:gpl2)))
+
+(define-public nomacs
+ (package
+ (name "nomacs")
+ (version "3.16.224")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nomacs/nomacs")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "05d4hqg0gl3g9s2xf1hr7mc7g4cqarcap4nzxxa51fsphw2b8x16"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:build-type "Release" ; fails to build with debug info
+ #:configure-flags (list "-DENABLE_TRANSLATIONS=true"
+ "-DUSE_SYSTEM_QUAZIP=true"
+ "-DENABLE_OPENCV=true")
+ #:tests? #f ; no rule for target 'test'
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'copy-plugins
+ (lambda* (#:key inputs #:allow-other-keys)
+ (copy-recursively (assoc-ref inputs "plugins")
+ "ImageLounge/plugins")))
+ (add-after 'copy-plugins 'cd-to-source-dir
+ (lambda _ (chdir "ImageLounge") #t)))))
+ (inputs
+ `(("plugins"
+ ,(origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nomacs/nomacs-plugins")
+ (commit "3.16")))
+ (sha256
+ (base32
+ "1cpdwhfvaxm970nwdc1hc13848a85pqqi176m9xpa3krla9qskml"))))
+ ("exiv2" ,exiv2)
+ ("libraw" ,libraw)
+ ("libtiff" ,libtiff)
+ ("opencv" ,opencv)
+ ("python" ,python-wrapper)
+ ("quazip" ,quazip)
+ ("qtbase" ,qtbase-5)
+ ("qtsvg" ,qtsvg)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("qtlinguist" ,qttools)))
+ (synopsis "Image viewer supporting all common formats")
+ (description "Nomacs is a simple to use image lounge featuring
+semi-transparent widgets that display additional information such as metadata,
+thumbnails and histograms. It is able to browse images compressed archives
+and add notes to images.
+
+Nomacs includes image manipulation methods for adjusting brightness, contrast,
+saturation, hue, gamma, and exposure. It has a pseudo color function which
+allows creating false color images. A unique feature of Nomacs is the
+synchronization of multiple instances.")
+ (home-page "https://nomacs.org/")
+ (license license:gpl3+)))
+
+(define-public xzgv
+ (package
+ (name "xzgv")
+ (version "0.9.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/xzgv/"
+ version "/xzgv-" version ".tar.gz"))
+ (sha256
+ (base32 "17l1xr9v07ggwga3vn0z1i4lnwjrr20rr8z1kjbw71aaijxl18i5"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'override-target-directory
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* "config.mk"
+ (("/usr/local") (assoc-ref outputs "out")))))
+ (delete 'configure) ; no configure script
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (install-file "src/xzgv" bin))))) ; just install the executable
+ #:tests? #f)) ; no rule for target 'test'
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("gtk+" ,gtk+-2)
+ ("libexif" ,libexif)))
+ (home-page "https://sourceforge.net/projects/xzgv/")
+ (synopsis "Picture viewer for X with a thumbnail-based selector")
+ (description
+ "xzgv is a fast image viewer that provides extensive keyboard support.")
+ (license license:gpl2+)))