From 44cd52cc31441c7f1417607c033bc7bfd68c65af Mon Sep 17 00:00:00 2001 From: Fugi Date: Fri, 18 Jul 2025 12:51:38 +0200 Subject: [PATCH] sieve-editor-gui: misc improvements --- pkgs/by-name/si/sieve-editor-gui/package.nix | 27 +++++++++----------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/pkgs/by-name/si/sieve-editor-gui/package.nix b/pkgs/by-name/si/sieve-editor-gui/package.nix index 1458f18b5854..0ae4fdf4b224 100644 --- a/pkgs/by-name/si/sieve-editor-gui/package.nix +++ b/pkgs/by-name/si/sieve-editor-gui/package.nix @@ -4,8 +4,6 @@ buildNpmPackage, fetchFromGitHub, electron, - nodejs_20, - nodePackages, makeDesktopItem, copyDesktopItems, runCommand, @@ -33,7 +31,6 @@ in buildNpmPackage { pname = "sieve-editor-gui"; version = "0.6.1-unstable-2025-03-12"; - nodejs = nodejs_20; src = fetchFromGitHub { owner = "thsmi"; @@ -44,17 +41,10 @@ buildNpmPackage { npmDepsHash = "sha256-w2i7XsTx3hlsh/JbvShaxvDyFGcBpL66lMy7KL2tnzM="; - nativeBuildInputs = [ - electron - nodePackages.gulp - ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ copyDesktopItems ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ copyDesktopItems ]; - dontNpmBuild = true; - - buildPhase = '' - gulp -LLLL app:package - ''; + npmBuildScript = "gulp"; + npmBuildFlags = [ "app:package" ]; installPhase = '' runHook preInstall @@ -62,7 +52,10 @@ buildNpmPackage { + lib.optionalString stdenv.hostPlatform.isLinux '' mv build/ $out + install -D $out/electron/resources/libs/icons/linux.png $out/share/icons/hicolor/64x64/apps/sieve.png + makeWrapper ${lib.getExe electron} $out/bin/sieve-editor-gui \ + --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \ --add-flags $out/electron/resources/main_esm.js '' + lib.optionalString stdenv.hostPlatform.isDarwin '' @@ -89,8 +82,12 @@ buildNpmPackage { name = "sieve-editor-gui"; exec = "sieve-editor-gui"; desktopName = "Sieve Editor"; - icon = "sieve-editor-gui"; - categories = [ "Utility" ]; + icon = "sieve"; + categories = [ + "Utility" + "Email" + ]; + comment = "Tool to Manage Sieve Message Filters"; }) ];