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 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, 11 14 }: 12 - 15 + let 16 + myQt = if qtVersion == 5 then libsForQt5 else kdePackages; 17 + inherit (myQt) wrapQtAppsHook; 18 + in 13 19 stdenv.mkDerivation (finalAttrs: { 14 20 pname = "nomacs"; 15 21 version = "3.19.1"; 22 + hash = "sha256-NRwZ/ShJaLCMFv7QdfRoJY5zQFo18cAVWGRpS3ap3Rw="; 16 23 17 24 src = fetchFromGitHub { 18 25 owner = "nomacs"; 19 26 repo = "nomacs"; 20 27 rev = finalAttrs.version; 21 28 fetchSubmodules = false; # We'll use our own 22 - hash = "sha256-NRwZ/ShJaLCMFv7QdfRoJY5zQFo18cAVWGRpS3ap3Rw="; 29 + inherit (finalAttrs) hash; 23 30 }; 24 31 25 - outputs = [ "out" ] 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" ] 26 41 # man pages are not installed on Darwin, see cmake/{Mac,Unix}BuildTarget.cmake 27 42 ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "man" ]; 28 43 29 44 sourceRoot = "${finalAttrs.src.name}/ImageLounge"; 30 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 + 31 53 nativeBuildInputs = [ 32 54 cmake 33 - libsForQt5.wrapQtAppsHook 55 + wrapQtAppsHook 34 56 pkg-config 35 57 ]; 36 58 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 - ]); 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 + ]); 53 77 54 78 cmakeFlags = [ 55 79 (lib.cmakeBool "ENABLE_OPENCV" true) ··· 65 89 mv $out/nomacs.app $out/Applications/nomacs.app 66 90 mv $out/libnomacsCore.dylib $out/lib/libnomacsCore.dylib 67 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 + ''; 68 99 69 100 meta = { 70 101 homepage = "https://nomacs.org"; ··· 88 119 changelog = "https://github.com/nomacs/nomacs/releases/tag/${finalAttrs.src.rev}"; 89 120 license = with lib.licenses; [ gpl3Plus ]; 90 121 mainProgram = "nomacs"; 91 - maintainers = with lib.maintainers; [ mindavi ]; 92 - inherit (libsForQt5.qtbase.meta) platforms; 122 + maintainers = with lib.maintainers; [ 123 + mindavi 124 + ppenguin 125 + ]; 126 + inherit (myQt.qtbase.meta) platforms; 93 127 }; 94 128 })
+2
pkgs/top-level/all-packages.nix
··· 4419 4419 nomad_1_9 4420 4420 ; 4421 4421 4422 + nomacs-qt6 = nomacs.override { qtVersion = 6; }; 4423 + 4422 4424 nth = with python3Packages; toPythonApplication name-that-hash; 4423 4425 4424 4426 nvchecker = with python3Packages; toPythonApplication (