diff options
author | Rick van Schijndel <Mindavi@users.noreply.github.com> | 2024-03-08 07:32:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-08 07:32:37 +0100 |
commit | 43235ab13a0ebb86b71cb3c56f0c3fdc677b8f7a (patch) | |
tree | 20d52fbcf85e856b2fe082a47cd8cdbdc743cc2b | |
parent | f98a3ccfa6faa5da98aa361835f005fc9a148f5d (diff) | |
parent | 569976027846b7646e1a2cc71e82faab24ca697a (diff) |
Merge pull request #292808 from atorres1985-contrib/nomacs
nomacs: 3.17.2287 -> 3.17.2295
-rw-r--r-- | pkgs/applications/graphics/nomacs/default.nix | 68 | ||||
-rw-r--r-- | pkgs/by-name/no/nomacs/package.nix | 90 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
3 files changed, 90 insertions, 70 deletions
diff --git a/pkgs/applications/graphics/nomacs/default.nix b/pkgs/applications/graphics/nomacs/default.nix deleted file mode 100644 index a5898a3ac007f..0000000000000 --- a/pkgs/applications/graphics/nomacs/default.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ lib -, stdenv -, fetchFromGitHub -, cmake -, pkg-config -, wrapQtAppsHook - -, qtbase -, qttools -, qtsvg -, qtimageformats - -, exiv2 -, opencv4 -, libraw -, libtiff -, quazip -}: - -stdenv.mkDerivation rec { - pname = "nomacs"; - version = "3.17.2287"; - - src = fetchFromGitHub { - owner = "nomacs"; - repo = "nomacs"; - rev = version; - hash = "sha256-OwiMB6O4+WuAt87sRbD1Qby3U7igqgCgddiWs3a4j3k="; - }; - - setSourceRoot = '' - sourceRoot=$(echo */ImageLounge) - ''; - - nativeBuildInputs = [cmake - pkg-config - wrapQtAppsHook]; - - buildInputs = [qtbase - qttools - qtsvg - qtimageformats - exiv2 - opencv4 - libraw - libtiff - quazip]; - - cmakeFlags = ["-DENABLE_OPENCV=ON" - "-DENABLE_RAW=ON" - "-DENABLE_TIFF=ON" - "-DENABLE_QUAZIP=ON" - "-DENABLE_TRANSLATIONS=ON" - "-DUSE_SYSTEM_QUAZIP=ON"]; - - postInstall = lib.optionalString stdenv.isDarwin '' - mkdir -p $out/lib - mv $out/libnomacsCore.dylib $out/lib/libnomacsCore.dylib - ''; - - meta = with lib; { - homepage = "https://nomacs.org"; - description = "Qt-based image viewer"; - maintainers = with lib.maintainers; [ mindavi ]; - license = licenses.gpl3Plus; - inherit (qtbase.meta) platforms; - }; -} diff --git a/pkgs/by-name/no/nomacs/package.nix b/pkgs/by-name/no/nomacs/package.nix new file mode 100644 index 0000000000000..5f4ee57ed94fc --- /dev/null +++ b/pkgs/by-name/no/nomacs/package.nix @@ -0,0 +1,90 @@ +{ lib +, cmake +, exiv2 +, fetchFromGitHub +, libraw +, libsForQt5 +, libtiff +, opencv4 +, pkg-config +, stdenv +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "nomacs"; + version = "3.17.2295"; + + src = fetchFromGitHub { + owner = "nomacs"; + repo = "nomacs"; + rev = finalAttrs.version; + fetchSubmodules = false; # We'll use our own + hash = "sha256-jHr7J0X1v2n/ZK0y3b/XPDISk7e08VWS6nicJU4fKKY="; + }; + + # Because some unknown reason split outputs is breaking on Darwin + outputs = if stdenv.isDarwin + then [ "out" ] + else [ "out" "man" ]; + + sourceRoot = "${finalAttrs.src.name}/ImageLounge"; + + nativeBuildInputs = [ + cmake + libsForQt5.wrapQtAppsHook + pkg-config + ]; + + buildInputs = [ + exiv2 + libraw + libtiff + opencv4 + ] ++ (with libsForQt5; [ + qtbase + qtimageformats + qtsvg + qttools + quazip + ]); + + cmakeFlags = [ + (lib.cmakeBool "ENABLE_OPENCV" true) + (lib.cmakeBool "ENABLE_QUAZIP" true) + (lib.cmakeBool "ENABLE_RAW" true) + (lib.cmakeBool "ENABLE_TIFF" true) + (lib.cmakeBool "ENABLE_TRANSLATIONS" true) + (lib.cmakeBool "USE_SYSTEM_QUAZIP" true) + ]; + + postInstall = lib.optionalString stdenv.isDarwin '' + mkdir -p $out/lib + mv $out/libnomacsCore.dylib $out/lib/libnomacsCore.dylib + ''; + + meta = { + homepage = "https://nomacs.org"; + description = "Qt-based image viewer"; + longDescription = '' + nomacs is a free, open source image viewer, which supports multiple + platforms. You can use it for viewing all common image formats including + RAW and psd images. + + nomacs features semi-transparent widgets that display additional + information such as thumbnails, metadata or histogram. It is able to + browse images in zip or MS Office files which can be extracted to a + directory. Metadata stored with the image can be displayed and you can add + notes to images. A thumbnail preview of the current folder is included as + well as a file explorer panel which allows switching between + folders. Within a directory you can apply a file filter, so that only + images are displayed whose filenames have a certain string or match a + regular expression. Activating the cache allows for instantly switching + between images. + ''; + changelog = "https://github.com/nomacs/nomacs/releases/tag/${finalAttrs.src.rev}"; + license = with lib.licenses; [ gpl3Plus ]; + mainProgram = "nomacs"; + maintainers = with lib.maintainers; [ AndersonTorres mindavi ]; + inherit (libsForQt5.qtbase.meta) platforms; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 97a4da725518d..d67a3d59f5530 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33969,8 +33969,6 @@ with pkgs; nheko = libsForQt5.callPackage ../applications/networking/instant-messengers/nheko { }; - nomacs = libsForQt5.callPackage ../applications/graphics/nomacs { }; - notepad-next = libsForQt5.callPackage ../applications/editors/notepad-next { }; notepadqq = libsForQt5.callPackage ../applications/editors/notepadqq { }; |