nomacs-qt6: init (master + plugins) (#359160)

authored by Rick van Schijndel and committed by GitHub 3d4bb1b3 75269b26

+68 -32
+66 -32
pkgs/by-name/no/nomacs/package.nix
··· 1 - { lib 2 - , cmake 3 - , exiv2 4 - , fetchFromGitHub 5 - , libraw 6 - , libsForQt5 7 - , libtiff 8 - , opencv4 9 - , pkg-config 10 - , stdenv 11 }: 12 - 13 stdenv.mkDerivation (finalAttrs: { 14 pname = "nomacs"; 15 version = "3.19.1"; 16 17 src = fetchFromGitHub { 18 owner = "nomacs"; 19 repo = "nomacs"; 20 rev = finalAttrs.version; 21 fetchSubmodules = false; # We'll use our own 22 - hash = "sha256-NRwZ/ShJaLCMFv7QdfRoJY5zQFo18cAVWGRpS3ap3Rw="; 23 }; 24 25 - outputs = [ "out" ] 26 # man pages are not installed on Darwin, see cmake/{Mac,Unix}BuildTarget.cmake 27 ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "man" ]; 28 29 sourceRoot = "${finalAttrs.src.name}/ImageLounge"; 30 31 nativeBuildInputs = [ 32 cmake 33 - libsForQt5.wrapQtAppsHook 34 pkg-config 35 ]; 36 37 - buildInputs = [ 38 - exiv2 39 - libraw 40 - libtiff 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; [ 46 - kimageformats 47 - qtbase 48 - qtimageformats 49 - qtsvg 50 - qttools 51 - quazip 52 - ]); 53 54 cmakeFlags = [ 55 (lib.cmakeBool "ENABLE_OPENCV" true) ··· 65 mv $out/nomacs.app $out/Applications/nomacs.app 66 mv $out/libnomacsCore.dylib $out/lib/libnomacsCore.dylib 67 ''; 68 69 meta = { 70 homepage = "https://nomacs.org"; ··· 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; [ mindavi ]; 92 - inherit (libsForQt5.qtbase.meta) platforms; 93 }; 94 })
··· 1 + { 2 + lib, 3 + cmake, 4 + exiv2, 5 + fetchFromGitHub, 6 + libraw, 7 + libsForQt5, 8 + kdePackages, 9 + libtiff, 10 + opencv4, 11 + pkg-config, 12 + stdenv, 13 + qtVersion ? 5, 14 }: 15 + let 16 + myQt = if qtVersion == 5 then libsForQt5 else kdePackages; 17 + inherit (myQt) wrapQtAppsHook; 18 + in 19 stdenv.mkDerivation (finalAttrs: { 20 pname = "nomacs"; 21 version = "3.19.1"; 22 + hash = "sha256-NRwZ/ShJaLCMFv7QdfRoJY5zQFo18cAVWGRpS3ap3Rw="; 23 24 src = fetchFromGitHub { 25 owner = "nomacs"; 26 repo = "nomacs"; 27 rev = finalAttrs.version; 28 fetchSubmodules = false; # We'll use our own 29 + inherit (finalAttrs) hash; 30 }; 31 32 + plugins = fetchFromGitHub { 33 + owner = "novomesk"; 34 + repo = "nomacs-plugins"; 35 + rev = "40d0f7089b7f108077dac5dede52e8a303b243b3"; 36 + hash = "sha256-7+JMmHaTvWjVTkLwXGtQHnoaC/3vK7haCzNvVIZ9F/g="; 37 + }; 38 + 39 + outputs = 40 + [ "out" ] 41 # man pages are not installed on Darwin, see cmake/{Mac,Unix}BuildTarget.cmake 42 ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "man" ]; 43 44 sourceRoot = "${finalAttrs.src.name}/ImageLounge"; 45 46 + postUnpack = '' 47 + rm -rf $sourceRoot/plugins 48 + mkdir $sourceRoot/plugins 49 + cp -r ${finalAttrs.plugins}/* $sourceRoot/plugins/ 50 + chmod -R +w $sourceRoot/plugins 51 + ''; 52 + 53 nativeBuildInputs = [ 54 cmake 55 + wrapQtAppsHook 56 pkg-config 57 ]; 58 59 + buildInputs = 60 + [ 61 + exiv2 62 + libraw 63 + libtiff 64 + # Once python stops relying on `propagatedBuildInputs` (https://github.com/NixOS/nixpkgs/issues/272178), deprecate `cxxdev` and switch to `dev`; 65 + # note `dev` is selected by `mkDerivation` automatically, so one should omit `getOutput "dev"`; 66 + # see: https://github.com/NixOS/nixpkgs/pull/314186#issuecomment-2129974277 67 + (lib.getOutput "cxxdev" opencv4) 68 + ] 69 + ++ (with myQt; [ 70 + kimageformats 71 + qtbase 72 + qtimageformats 73 + qtsvg 74 + qttools 75 + quazip 76 + ]); 77 78 cmakeFlags = [ 79 (lib.cmakeBool "ENABLE_OPENCV" true) ··· 89 mv $out/nomacs.app $out/Applications/nomacs.app 90 mv $out/libnomacsCore.dylib $out/lib/libnomacsCore.dylib 91 ''; 92 + # FIXME: 93 + # why can't we have nomacs look in the "standard" plugin directory??? 94 + # None of the wrap stuff worked... 95 + # Let's just instead move the plugin dir brute force 96 + postFixup = '' 97 + mv $out/lib/nomacs-plugins $out/bin/plugins 98 + ''; 99 100 meta = { 101 homepage = "https://nomacs.org"; ··· 119 changelog = "https://github.com/nomacs/nomacs/releases/tag/${finalAttrs.src.rev}"; 120 license = with lib.licenses; [ gpl3Plus ]; 121 mainProgram = "nomacs"; 122 + maintainers = with lib.maintainers; [ 123 + mindavi 124 + ppenguin 125 + ]; 126 + inherit (myQt.qtbase.meta) platforms; 127 }; 128 })
+2
pkgs/top-level/all-packages.nix
··· 4419 nomad_1_9 4420 ; 4421 4422 nth = with python3Packages; toPythonApplication name-that-hash; 4423 4424 nvchecker = with python3Packages; toPythonApplication (
··· 4419 nomad_1_9 4420 ; 4421 4422 + nomacs-qt6 = nomacs.override { qtVersion = 6; }; 4423 + 4424 nth = with python3Packages; toPythonApplication name-that-hash; 4425 4426 nvchecker = with python3Packages; toPythonApplication (