forked from mirrors/nixpkgs
d21e4a9514
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 <jtojnar@gmail.com>
59 lines
1.8 KiB
Nix
59 lines
1.8 KiB
Nix
{ stdenv, fetchurl, meson, ninja, pkgconfig, gettext, gnome3, glib, gtk3, pango, wrapGAppsHook, python3
|
|
, gobject-introspection, gjs, libunistring, gsettings-desktop-schemas, adwaita-icon-theme, gnome-desktop }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "gnome-characters-${version}";
|
|
version = "3.32.1";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnome/sources/gnome-characters/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
|
|
sha256 = "1mpg125x9k879ryg8xgbm9w1amx6b3iq9sqv7xfii7kzaanjb4js";
|
|
};
|
|
|
|
postPatch = ''
|
|
chmod +x meson_post_install.py # patchShebangs requires executable file
|
|
patchShebangs meson_post_install.py
|
|
'';
|
|
|
|
passthru = {
|
|
updateScript = gnome3.updateScript {
|
|
packageName = "gnome-characters";
|
|
attrPath = "gnome3.gnome-characters";
|
|
};
|
|
};
|
|
|
|
nativeBuildInputs = [ meson ninja pkgconfig gettext wrapGAppsHook python3 gobject-introspection ];
|
|
buildInputs = [
|
|
glib gtk3 gjs pango gsettings-desktop-schemas
|
|
adwaita-icon-theme libunistring
|
|
# typelib
|
|
gnome-desktop
|
|
];
|
|
|
|
mesonFlags = [
|
|
"-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";
|
|
maintainers = gnome3.maintainers;
|
|
license = licenses.gpl2;
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|