Merge pull request #100116 from worldofpeace/pantheon-stuff
Pantheon fixups
This commit is contained in:
commit
8cd159b861
@ -62,24 +62,45 @@ let
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
executable = writeScript "pantheon" ''
|
executable = writeScript "pantheon" ''
|
||||||
export XDG_CONFIG_DIRS=${elementary-settings-daemon}/etc/xdg:${elementary-default-settings}/etc:$XDG_CONFIG_DIRS
|
# gnome-session can find RequiredComponents for `pantheon` session (notably pantheon's patched g-s-d autostarts)
|
||||||
|
export XDG_CONFIG_DIRS=@out@/etc/xdg:$XDG_CONFIG_DIRS
|
||||||
|
|
||||||
|
# Make sure we use our gtk-3.0/settings.ini
|
||||||
|
export XDG_CONFIG_DIRS=${elementary-default-settings}/etc:$XDG_CONFIG_DIRS
|
||||||
|
|
||||||
|
# * gnome-session can find the `pantheon' session
|
||||||
|
# * use pantheon-mimeapps.list
|
||||||
export XDG_DATA_DIRS=@out@/share:$XDG_DATA_DIRS
|
export XDG_DATA_DIRS=@out@/share:$XDG_DATA_DIRS
|
||||||
exec ${gnome-session}/bin/gnome-session --session=pantheon "$@"
|
|
||||||
|
# Start pantheon session. Keep in sync with upstream
|
||||||
|
exec ${gnome-session}/bin/gnome-session --builtin --session=pantheon "$@"
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Absolute path patched version of the upstream xsession
|
||||||
|
xsession = writeText "pantheon.desktop" ''
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Pantheon
|
||||||
|
Comment=This session provides elementary experience
|
||||||
|
Exec=@out@/libexec/pantheon
|
||||||
|
TryExec=${wingpanel}/bin/wingpanel
|
||||||
|
Icon=
|
||||||
|
DesktopNames=Pantheon
|
||||||
|
Type=Application
|
||||||
'';
|
'';
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "elementary-session-settings-unstable";
|
pname = "elementary-session-settings-unstable";
|
||||||
version = "2020-06-11";
|
version = "2020-07-06";
|
||||||
|
|
||||||
repoName = "session-settings";
|
repoName = "session-settings";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "elementary";
|
owner = "elementary";
|
||||||
repo = repoName;
|
repo = repoName;
|
||||||
rev = "130c9ae221913032ed18bcf6d21e3dcdba3c4209";
|
rev = "fa15cbd83fba0ba30e9a302db880350bff5ace52";
|
||||||
sha256 = "0bzg9vbq0ssnxgcb2vxpx6x9zv8ngkm9r3ki5q83m9al9919n0pr";
|
hash = "sha256-26H791c7OAjFYtjVChIatICSocMt0uTej1TKBOvw+6w=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
@ -104,20 +125,22 @@ stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
# our mimeapps patched from upstream to exclude:
|
||||||
|
# * pantheon-mail -> geary
|
||||||
|
# * evince.desktop -> org.gnome.Evince.desktop
|
||||||
mkdir -p $out/share/applications
|
mkdir -p $out/share/applications
|
||||||
cp -av ${./pantheon-mimeapps.list} $out/share/applications/pantheon-mimeapps.list
|
cp -av ${./pantheon-mimeapps.list} $out/share/applications/pantheon-mimeapps.list
|
||||||
|
|
||||||
|
# instantiates pantheon's dockitems
|
||||||
cp "${dockitemAutostart}" $out/etc/xdg/autostart/default-elementary-dockitems.desktop
|
cp "${dockitemAutostart}" $out/etc/xdg/autostart/default-elementary-dockitems.desktop
|
||||||
|
|
||||||
|
# script `Exec` to start pantheon
|
||||||
mkdir -p $out/libexec
|
mkdir -p $out/libexec
|
||||||
substitute ${executable} $out/libexec/pantheon --subst-var out
|
substitute ${executable} $out/libexec/pantheon --subst-var out
|
||||||
chmod +x $out/libexec/pantheon
|
chmod +x $out/libexec/pantheon
|
||||||
'';
|
|
||||||
|
|
||||||
postFixup = ''
|
# absolute path patched xsession
|
||||||
substituteInPlace $out/share/xsessions/pantheon.desktop \
|
substitute ${xsession} $out/share/xsessions/pantheon.desktop --subst-var out
|
||||||
--replace "gnome-session --session=pantheon" "$out/libexec/pantheon" \
|
|
||||||
--replace "wingpanel" "${wingpanel}/bin/wingpanel"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
, json-glib
|
, json-glib
|
||||||
, elementary-dock
|
, elementary-dock
|
||||||
, bamf
|
, bamf
|
||||||
, switchboard
|
, switchboard-with-plugs
|
||||||
, libunity
|
, libunity
|
||||||
, libsoup
|
, libsoup
|
||||||
, wingpanel
|
, wingpanel
|
||||||
@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
|
|||||||
pkgconfig
|
pkgconfig
|
||||||
python3
|
python3
|
||||||
vala
|
vala
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
bamf
|
bamf
|
||||||
@ -66,10 +66,16 @@ stdenv.mkDerivation rec {
|
|||||||
libhandy
|
libhandy
|
||||||
libsoup
|
libsoup
|
||||||
libunity
|
libunity
|
||||||
switchboard
|
switchboard-with-plugs
|
||||||
wingpanel
|
wingpanel
|
||||||
zeitgeist
|
zeitgeist
|
||||||
];
|
] ++
|
||||||
|
# applications-menu has a plugin to search switchboard plugins
|
||||||
|
# see https://github.com/NixOS/nixpkgs/issues/100209
|
||||||
|
# wingpanel's wrapper will need to pick up the fact that
|
||||||
|
# applications-menu needs a version of switchboard with all
|
||||||
|
# its plugins for search.
|
||||||
|
switchboard-with-plugs.buildInputs;
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"--sysconfdir=${placeholder "out"}/etc"
|
"--sysconfdir=${placeholder "out"}/etc"
|
||||||
|
@ -131,16 +131,6 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
for autostart in $(grep -rl "OnlyShowIn=GNOME;" $out/etc/xdg/autostart)
|
|
||||||
do
|
|
||||||
echo "Patching OnlyShowIn to Pantheon in: $autostart"
|
|
||||||
sed -i "s,OnlyShowIn=GNOME;,OnlyShowIn=Pantheon;," $autostart
|
|
||||||
done
|
|
||||||
|
|
||||||
# This breaks lightlocker https://github.com/elementary/session-settings/commit/b0e7a2867608c3a3916f9e4e21a68264a20e44f8
|
|
||||||
# TODO: shouldn't be neeed for the 5.1 greeter (awaiting release)
|
|
||||||
rm $out/etc/xdg/autostart/org.gnome.SettingsDaemon.ScreensaverProxy.desktop
|
|
||||||
|
|
||||||
# So the polkit policy can reference /run/current-system/sw/bin/elementary-settings-daemon/gsd-backlight-helper
|
# So the polkit policy can reference /run/current-system/sw/bin/elementary-settings-daemon/gsd-backlight-helper
|
||||||
mkdir -p $out/bin/elementary-settings-daemon
|
mkdir -p $out/bin/elementary-settings-daemon
|
||||||
ln -s $out/libexec/gsd-backlight-helper $out/bin/elementary-settings-daemon/gsd-backlight-helper
|
ln -s $out/libexec/gsd-backlight-helper $out/bin/elementary-settings-daemon/gsd-backlight-helper
|
||||||
|
Loading…
x
Reference in New Issue
Block a user