From d21e4a95144d18faaf047dcccd2c7ad4b962ed88 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Tue, 20 Aug 2019 14:17:17 -0400 Subject: [PATCH] gnome3.gnome-characters: correct entry point By wraping the files, the `*-.wrapped` file will be recognized as the entry point, which is used as a base for loading additional files so we need to override the entry point function. We also ensure BackgroundService gets wrapped with wrapGAppsHook. Fixes #31168 Co-authored-by: Jan Tojnar --- .../gnome-3/apps/gnome-characters/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/desktops/gnome-3/apps/gnome-characters/default.nix b/pkgs/desktops/gnome-3/apps/gnome-characters/default.nix index c95d135e9e73..a634330d0b7a 100644 --- a/pkgs/desktops/gnome-3/apps/gnome-characters/default.nix +++ b/pkgs/desktops/gnome-3/apps/gnome-characters/default.nix @@ -34,6 +34,20 @@ stdenv.mkDerivation rec { "-Ddbus_service_dir=${placeholder "out"}/share/dbus-1/services" ]; + dontWrapGApps = true; + + # Fixes https://github.com/NixOS/nixpkgs/issues/31168 + postFixup = '' + for file in $out/share/org.gnome.Characters/org.gnome.Characters \ + $out/share/org.gnome.Characters/org.gnome.Characters.BackgroundService + do + sed -e $"2iimports.package._findEffectiveEntryPointName = () => \'$(basename $file)\' " \ + -i $file + + wrapProgram $file "''${gappsWrapperArgs[@]}" + done + ''; + meta = with stdenv.lib; { homepage = https://wiki.gnome.org/Design/Apps/CharacterMap; description = "Simple utility application to find and insert unusual characters";