Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8918b8a5229b
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8ecf4da85afd
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Mar 7, 2019

  1. gnome3.gnome-settings-daemon: bypass polkit by using an suid wrapper

    This is intended to fix #14168 untli we have a better solution from
    upstream GNOME.
    
    The issue in brief is caused by the fact that gnome-settings-daemon is
    non-restartable and if the policy definitions change in any way
    it won't propagate to the running system because of that.
    
    Also take note that we're abusing a debugging envar
    `GSD_BACKLIGHT_HELPER` as it was never intended
    for use outside testing.
    worldofpeace committed Mar 7, 2019
    Copy the full SHA
    8ecf4da View commit details
Showing with 17 additions and 1 deletion.
  1. +12 −0 nixos/modules/services/desktops/gnome3/gnome-settings-daemon.nix
  2. +5 −1 pkgs/desktops/gnome-3/core/gnome-settings-daemon/default.nix
12 changes: 12 additions & 0 deletions nixos/modules/services/desktops/gnome3/gnome-settings-daemon.nix
Original file line number Diff line number Diff line change
@@ -40,6 +40,18 @@ in

services.udev.packages = [ cfg.package ];

security.wrappers.gsd-backlight-helper.source = "${pkgs.gnome3.gnome-settings-daemon}/libexec/gsd-backlight-helper";

nixpkgs.overlays = [
(self: super: {
gnome3 = super.gnome3.overrideScope' (gself: gsuper: {
gnome-settings-daemon = gsuper.gnome-settings-daemon.override {
inherit (config.security) wrapperDir;
};
});
})
];

};

}
6 changes: 5 additions & 1 deletion pkgs/desktops/gnome-3/core/gnome-settings-daemon/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ fetchurl, substituteAll, stdenv, meson, ninja, pkgconfig, gnome3, perl, gettext, gtk3, glib, libnotify, lcms2, libXtst
, libxkbfile, libpulseaudio, alsaLib, libcanberra-gtk3, upower, colord, libgweather, polkit, gsettings-desktop-schemas
, geoclue2, librsvg, xf86_input_wacom, udev, libgudev, libwacom, libxslt, libxml2, networkmanager
, gnome-desktop, geocode-glib, docbook_xsl, wrapGAppsHook, python3, ibus, xkeyboard_config, tzdata, nss }:
, gnome-desktop, geocode-glib, docbook_xsl, wrapGAppsHook, python3, ibus, xkeyboard_config, tzdata, nss, wrapperDir ? "/run/wrappers/bin" }:

stdenv.mkDerivation rec {
name = "gnome-settings-daemon-${version}";
@@ -32,6 +32,10 @@ stdenv.mkDerivation rec {
"-Dudev_dir=${placeholder "out"}/lib/udev"
];

preFixup = ''
gappsWrapperArgs+=(--set GSD_BACKLIGHT_HELPER "${wrapperDir}/gsd-backlight-helper")
'';

postPatch = ''
for f in gnome-settings-daemon/codegen.py plugins/power/gsd-power-constants-update.pl meson_post_install.py; do
chmod +x $f