2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
|
|
|
, meson
|
|
|
|
, ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, gettext
|
2021-05-20 23:08:51 +00:00
|
|
|
, gnome
|
2020-04-24 23:36:52 +00:00
|
|
|
, glib
|
2022-03-30 09:31:56 +00:00
|
|
|
, gtk4
|
2020-04-24 23:36:52 +00:00
|
|
|
, pango
|
2022-03-30 09:31:56 +00:00
|
|
|
, wrapGAppsHook4
|
2020-04-24 23:36:52 +00:00
|
|
|
, python3
|
2022-03-30 09:31:56 +00:00
|
|
|
, desktop-file-utils
|
2020-04-24 23:36:52 +00:00
|
|
|
, gobject-introspection
|
|
|
|
, gjs
|
|
|
|
, libunistring
|
2022-03-30 09:31:56 +00:00
|
|
|
, libadwaita
|
2020-04-24 23:36:52 +00:00
|
|
|
, gsettings-desktop-schemas
|
|
|
|
, gnome-desktop
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gnome-characters";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "42.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-05-20 23:08:51 +00:00
|
|
|
url = "mirror://gnome/sources/gnome-characters/${lib.versions.major version}/${pname}-${version}.tar.xz";
|
2022-03-30 09:31:56 +00:00
|
|
|
sha256 = "XaD/uBb4prRPMDdEyoJ6NAgBGMHJONjXmvF7f+Z5gPg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
gettext
|
|
|
|
gobject-introspection
|
|
|
|
meson
|
|
|
|
ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
python3
|
2022-03-30 09:31:56 +00:00
|
|
|
desktop-file-utils
|
|
|
|
wrapGAppsHook4
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gjs
|
|
|
|
glib
|
|
|
|
gnome-desktop # for typelib
|
|
|
|
gsettings-desktop-schemas
|
2022-03-30 09:31:56 +00:00
|
|
|
gtk4
|
2020-04-24 23:36:52 +00:00
|
|
|
libunistring
|
2022-03-30 09:31:56 +00:00
|
|
|
libadwaita
|
2020-04-24 23:36:52 +00:00
|
|
|
pango
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
chmod +x meson_post_install.py # patchShebangs requires executable file
|
|
|
|
patchShebangs meson_post_install.py
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
# https://gitlab.gnome.org/GNOME/gnome-characters/-/merge_requests/70
|
|
|
|
substituteInPlace meson_post_install.py \
|
|
|
|
--replace "gtk-update-icon-cache" "gtk4-update-icon-cache"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
dontWrapGApps = true;
|
|
|
|
|
|
|
|
postFixup = ''
|
2022-03-30 09:31:56 +00:00
|
|
|
# Fixes https://github.com/NixOS/nixpkgs/issues/31168
|
|
|
|
file="$out/share/org.gnome.Characters/org.gnome.Characters"
|
|
|
|
sed -e $"2iimports.package._findEffectiveEntryPointName = () => \'$(basename $file)\' " \
|
|
|
|
-i $file
|
|
|
|
wrapGApp "$file"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
2021-05-20 23:08:51 +00:00
|
|
|
updateScript = gnome.updateScript {
|
2020-04-24 23:36:52 +00:00
|
|
|
packageName = pname;
|
2021-05-20 23:08:51 +00:00
|
|
|
attrPath = "gnome.${pname}";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-05-20 23:08:51 +00:00
|
|
|
homepage = "https://wiki.gnome.org/Apps/Characters";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Simple utility application to find and insert unusual characters";
|
|
|
|
maintainers = teams.gnome.members;
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|