13 stdenv.mkDerivation (finalAttrs: {
17 src = fetchFromGitHub {
20 rev = finalAttrs.version;
21 fetchSubmodules = false; # We'll use our own
22 hash = "sha256-lpmM2GfMDlIp1vnbHMaOdicFcKH6LwEoKSETMt7C1NY=";
26 # man pages are not installed on Darwin, see cmake/{Mac,Unix}BuildTarget.cmake
27 ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "man" ];
29 sourceRoot = "${finalAttrs.src.name}/ImageLounge";
33 libsForQt5.wrapQtAppsHook
41 # Once python stops relying on `propagatedBuildInputs` (https://github.com/NixOS/nixpkgs/issues/272178), deprecate `cxxdev` and switch to `dev`;
42 # note `dev` is selected by `mkDerivation` automatically, so one should omit `getOutput "dev"`;
43 # see: https://github.com/NixOS/nixpkgs/pull/314186#issuecomment-2129974277
44 (lib.getOutput "cxxdev" opencv4)
45 ] ++ (with libsForQt5; [
55 (lib.cmakeBool "ENABLE_OPENCV" true)
56 (lib.cmakeBool "ENABLE_QUAZIP" true)
57 (lib.cmakeBool "ENABLE_RAW" true)
58 (lib.cmakeBool "ENABLE_TIFF" true)
59 (lib.cmakeBool "ENABLE_TRANSLATIONS" true)
60 (lib.cmakeBool "USE_SYSTEM_QUAZIP" true)
63 postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
64 mkdir -p $out/{Applications,lib}
65 mv $out/nomacs.app $out/Applications/nomacs.app
66 mv $out/libnomacsCore.dylib $out/lib/libnomacsCore.dylib
70 homepage = "https://nomacs.org";
71 description = "Qt-based image viewer";
73 nomacs is a free, open source image viewer, which supports multiple
74 platforms. You can use it for viewing all common image formats including
77 nomacs features semi-transparent widgets that display additional
78 information such as thumbnails, metadata or histogram. It is able to
79 browse images in zip or MS Office files which can be extracted to a
80 directory. Metadata stored with the image can be displayed and you can add
81 notes to images. A thumbnail preview of the current folder is included as
82 well as a file explorer panel which allows switching between
83 folders. Within a directory you can apply a file filter, so that only
84 images are displayed whose filenames have a certain string or match a
85 regular expression. Activating the cache allows for instantly switching
88 changelog = "https://github.com/nomacs/nomacs/releases/tag/${finalAttrs.src.rev}";
89 license = with lib.licenses; [ gpl3Plus ];
90 mainProgram = "nomacs";
91 maintainers = with lib.maintainers; [ AndersonTorres mindavi ];
92 inherit (libsForQt5.qtbase.meta) platforms;