about summary refs log tree commit diff
path: root/pkgs/desktops/mate/mate-settings-daemon/wrapped.nix
blob: 1bbe53c447862f06c0d07247c32088c5e928afc8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ 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; };
}