nixpkgs-suyu/pkgs/desktops/gnome-3/core/gnome-control-center/default.nix
Jan Tojnar 87e1643acc
gnome3.gnome-control-center: add grilo-plugins
Opening a background change dialogue produces the following errors in the console:

    (gnome-control-center:27270): Grilo-WARNING **: 21:57:21.349: [registry] ../src/grl-registry.c:1354: Could not open directory '/nix/store/q8wdbr08617p3xqxdg8935p31fha020f-grilo-0.3.9/lib/grilo-0.3': Error opening directory “/nix/store/q8wdbr08617p3xqxdg8935p31fha020f-grilo-0.3.9/lib/grilo-0.3”: No such file or directory
    (gnome-control-center:27270): Grilo-WARNING **: 21:57:21.352: [registry] ../src/grl-registry.c:1461: Plugin 'grl-flickr' not available
    (gnome-control-center:27270): background-cc-panel-WARNING **: 21:57:21.352: Plugin “grl-flickr” not available

Apparently, there are no plugins in `grilo` package – everything is in `grilo-plugins`, so we need to add `grilo-plugins` to inputs. The setup hook will make the plug-ins available through an environment variable:

https://gitlab.gnome.org/GNOME/grilo/blob/grilo-0.3.9/src/grilo.c#L111-135
2019-08-25 00:03:25 +02:00

179 lines
3.3 KiB
Nix

{ fetchurl
, stdenv
, substituteAll
, accountsservice
, adwaita-icon-theme
, cheese
, clutter
, clutter-gtk
, colord
, colord-gtk
, cups
, docbook_xsl
, fontconfig
, gdk-pixbuf
, gettext
, glib
, glib-networking
, glibc
, gnome-bluetooth
, gnome-color-manager
, gnome-desktop
, gnome-online-accounts
, gnome-session
, gnome-settings-daemon
, gnome3
, grilo
, grilo-plugins
, gsettings-desktop-schemas
, gsound
, gtk3
, ibus
, libcanberra-gtk3
, libgnomekbd
, libgtop
, libgudev
, libhandy
, libkrb5
, libpulseaudio
, libpwquality
, librsvg
, libsecret
, libsoup
, libwacom
, libxml2
, libxslt
, meson
, modemmanager
, mutter
, networkmanager
, networkmanagerapplet
, ninja
, pkgconfig
, polkit
, python3
, samba
, shared-mime-info
, sound-theme-freedesktop
, tracker
, tzdata
, udisks2
, upower
, vino
, wrapGAppsHook
}:
stdenv.mkDerivation rec {
pname = "gnome-control-center";
version = "3.32.2";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "03np0mhfl9kkdw4cb711pda0cli9zgh2bq2gqn2zwbdi3qnhk9gs";
};
nativeBuildInputs = [
docbook_xsl
gettext
libxslt
meson
ninja
pkgconfig
python3
shared-mime-info
wrapGAppsHook
];
buildInputs = [
accountsservice
adwaita-icon-theme
cheese
clutter
clutter-gtk
colord
colord-gtk
fontconfig
gdk-pixbuf
glib
glib-networking
gnome-bluetooth
gnome-desktop
gnome-online-accounts
gnome-settings-daemon
grilo
grilo-plugins # for setting wallpaper from Flickr
gsettings-desktop-schemas
gsound
gtk3
ibus
libcanberra-gtk3
libgtop
libgudev
libhandy
libkrb5
libpulseaudio
libpwquality
librsvg
libsecret
libsoup
libwacom
libxml2
modemmanager
mutter # schemas for the keybindings
networkmanager
networkmanagerapplet
polkit
samba
tracker
udisks2
upower
vino
];
patches = [
(substituteAll {
src = ./paths.patch;
gcm = gnome-color-manager;
gnome_desktop = gnome-desktop;
inherit glibc libgnomekbd tzdata;
inherit cups networkmanagerapplet;
})
];
postPatch = ''
chmod +x build-aux/meson/meson_post_install.py # patchShebangs requires executable file
patchShebangs build-aux/meson/meson_post_install.py
'';
mesonFlags = [
"-Dgnome_session_libexecdir=${gnome-session}/libexec"
];
preFixup = ''
gappsWrapperArgs+=(
--prefix XDG_DATA_DIRS : "${sound-theme-freedesktop}/share"
# Thumbnailers (for setting user profile pictures)
--prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share"
--prefix XDG_DATA_DIRS : "${librsvg}/share"
# WM keyboard shortcuts
--prefix XDG_DATA_DIRS : "${mutter}/share"
)
for i in $out/share/applications/*; do
substituteInPlace $i --replace "Exec=gnome-control-center" "Exec=$out/bin/gnome-control-center"
done
'';
passthru = {
updateScript = gnome3.updateScript {
packageName = pname;
attrPath = "gnome3.${pname}";
};
};
meta = with stdenv.lib; {
description = "Utilities to configure the GNOME desktop";
license = licenses.gpl2Plus;
maintainers = gnome3.maintainers;
platforms = platforms.linux;
};
}