From 7ca4bdd62e116781644a898fbb4ffbad8e19c08f Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Fri, 1 Apr 2022 07:44:43 +0400 Subject: [PATCH] mate-settings-daemon-wrapped: init --- pkgs/desktops/mate/default.nix | 2 ++ .../mate/mate-settings-daemon/wrapped.nix | 22 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/desktops/mate/mate-settings-daemon/wrapped.nix diff --git a/pkgs/desktops/mate/default.nix b/pkgs/desktops/mate/default.nix index 2c5b45a653e5..b9ce82e345bf 100644 --- a/pkgs/desktops/mate/default.nix +++ b/pkgs/desktops/mate/default.nix @@ -42,6 +42,7 @@ let mate-sensors-applet = callPackage ./mate-sensors-applet { }; mate-session-manager = callPackage ./mate-session-manager { }; mate-settings-daemon = callPackage ./mate-settings-daemon { }; + mate-settings-daemon-wrapped = callPackage ./mate-settings-daemon/wrapped.nix { }; mate-screensaver = callPackage ./mate-screensaver { }; mate-system-monitor = callPackage ./mate-system-monitor { }; mate-terminal = callPackage ./mate-terminal { }; @@ -70,6 +71,7 @@ let mate-polkit mate-session-manager mate-settings-daemon + mate-settings-daemon-wrapped mate-themes ]; diff --git a/pkgs/desktops/mate/mate-settings-daemon/wrapped.nix b/pkgs/desktops/mate/mate-settings-daemon/wrapped.nix new file mode 100644 index 000000000000..8fe7a4cf2b28 --- /dev/null +++ b/pkgs/desktops/mate/mate-settings-daemon/wrapped.nix @@ -0,0 +1,22 @@ +{ stdenv, mate, glib, wrapGAppsHook }: + +stdenv.mkDerivation { + pname = "${mate.mate-settings-daemon.pname}-wrapped"; + version = mate.mate-settings-daemon.version; + nativeBuildInputs = [ wrapGAppsHook ]; + buildInputs = [ glib mate.mate-control-center ]; + dontWrapGApps = true; + dontUnpack = true; + installPhase = '' + mkdir -p $out/etc/xdg/autostart + cp ${mate.mate-settings-daemon}/etc/xdg/autostart/mate-settings-daemon.desktop $out/etc/xdg/autostart + ''; + postFixup = '' + mkdir -p $out/libexec + makeWrapper ${mate.mate-settings-daemon}/libexec/mate-settings-daemon $out/libexec/mate-settings-daemon \ + "''${gappsWrapperArgs[@]}" + substituteInPlace $out/etc/xdg/autostart/mate-settings-daemon.desktop \ + --replace "${mate.mate-settings-daemon}/libexec/mate-settings-daemon" "$out/libexec/mate-settings-daemon" + ''; + meta = mate.mate-settings-daemon.meta // { priority = -10; }; +}