···
16
+
myQt = if qtVersion == 5 then libsForQt5 else kdePackages;
17
+
inherit (myQt) wrapQtAppsHook;
stdenv.mkDerivation (finalAttrs: {
22
+
hash = "sha256-NRwZ/ShJaLCMFv7QdfRoJY5zQFo18cAVWGRpS3ap3Rw=";
rev = finalAttrs.version;
fetchSubmodules = false; # We'll use our own
22
-
hash = "sha256-NRwZ/ShJaLCMFv7QdfRoJY5zQFo18cAVWGRpS3ap3Rw=";
29
+
inherit (finalAttrs) hash;
32
+
plugins = fetchFromGitHub {
34
+
repo = "nomacs-plugins";
35
+
rev = "40d0f7089b7f108077dac5dede52e8a303b243b3";
36
+
hash = "sha256-7+JMmHaTvWjVTkLwXGtQHnoaC/3vK7haCzNvVIZ9F/g=";
# man pages are not installed on Darwin, see cmake/{Mac,Unix}BuildTarget.cmake
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "man" ];
sourceRoot = "${finalAttrs.src.name}/ImageLounge";
47
+
rm -rf $sourceRoot/plugins
48
+
mkdir $sourceRoot/plugins
49
+
cp -r ${finalAttrs.plugins}/* $sourceRoot/plugins/
50
+
chmod -R +w $sourceRoot/plugins
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; [
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)
(lib.cmakeBool "ENABLE_OPENCV" true)
···
mv $out/nomacs.app $out/Applications/nomacs.app
mv $out/libnomacsCore.dylib $out/lib/libnomacsCore.dylib
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
97
+
mv $out/lib/nomacs-plugins $out/bin/plugins
homepage = "https://nomacs.org";
···
changelog = "https://github.com/nomacs/nomacs/releases/tag/${finalAttrs.src.rev}";
license = with lib.licenses; [ gpl3Plus ];
91
-
maintainers = with lib.maintainers; [ mindavi ];
92
-
inherit (libsForQt5.qtbase.meta) platforms;
122
+
maintainers = with lib.maintainers; [
126
+
inherit (myQt.qtbase.meta) platforms;