@@ -1,39 +1,80 @@
1−{ stdenv, fetchurl, meson, ninja, pkgconfig, gettext, gnome3, glib, gtk3, pango, wrapGAppsHook, python3
2−, gobject-introspection, gjs, libunistring, gsettings-desktop-schemas, adwaita-icon-theme, gnome-desktop }:
1+{ stdenv
2+, fetchurl
3+, meson
4+, ninja
5+, pkgconfig
6+, gettext
7+, gnome3
8+, glib
9+, gtk3
10+, pango
11+, wrapGAppsHook
12+, python3
13+, gobject-introspection
14+, gjs
15+, libunistring
16+, gsettings-desktop-schemas
17+, adwaita-icon-theme
18+, gnome-desktop
19+}:
320
421stdenv.mkDerivation rec {
5− name = "gnome-characters-${version}";
22+ pname = "gnome-characters";
623 version = "3.32.1";
724
825 src = fetchurl {
9− url = "mirror://gnome/sources/gnome-characters/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
26+ url = "mirror://gnome/sources/gnome-characters/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
1027 sha256 = "1mpg125x9k879ryg8xgbm9w1amx6b3iq9sqv7xfii7kzaanjb4js";
1128 };
1229
30+ nativeBuildInputs = [
31+ gettext
32+ gobject-introspection
33+ meson
34+ ninja
35+ pkgconfig
36+ python3
37+ wrapGAppsHook
38+ ];
39+
40+
41+ buildInputs = [
42+ adwaita-icon-theme
43+ gjs
44+ glib
45+ gnome-desktop # for typelib
46+ gsettings-desktop-schemas
47+ gtk3
48+ libunistring
49+ pango
50+ ];
51+
1352 postPatch = ''
1453 chmod +x meson_post_install.py # patchShebangs requires executable file
1554 patchShebangs meson_post_install.py
1655 '';
1756
57+ dontWrapGApps = true;
58+
59+ # Fixes https://github.com/NixOS/nixpkgs/issues/31168
60+ postFixup = ''
61+ for file in $out/share/org.gnome.Characters/org.gnome.Characters \
62+ $out/share/org.gnome.Characters/org.gnome.Characters.BackgroundService
63+ do
64+ sed -e $"2iimports.package._findEffectiveEntryPointName = () => \'$(basename $file)\' " \
65+ -i $file
66+
67+ wrapProgram $file "''${gappsWrapperArgs[@]}"
68+ done
69+ '';
70+
1871 passthru = {
1972 updateScript = gnome3.updateScript {
20− packageName = "gnome-characters";
21− attrPath = "gnome3.gnome-characters";
73+ packageName = pname;
74+ attrPath = "gnome3.${pname}";
2275 };
2376 };
2477
25− nativeBuildInputs = [ meson ninja pkgconfig gettext wrapGAppsHook python3 gobject-introspection ];
26− buildInputs = [
27− glib gtk3 gjs pango gsettings-desktop-schemas
28− adwaita-icon-theme libunistring
29− # typelib
30− gnome-desktop
31− ];
32−
33− mesonFlags = [
34− "-Ddbus_service_dir=${placeholder "out"}/share/dbus-1/services"
35− ];
36−
3778 meta = with stdenv.lib; {
3879 homepage = https://wiki.gnome.org/Design/Apps/CharacterMap;
3980 description = "Simple utility application to find and insert unusual characters";