gnome3.gnome-flashback: 3.36.3 -> 3.37.2

* reformat

Co-authored-by: WORLDofPEACE <worldofpeace@protonmail.ch>
This commit is contained in:
Piotr Bogdan 2020-08-25 08:33:38 +01:00 committed by Jan Tojnar
parent 51597e6435
commit 9deacb776b
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4

View File

@ -27,10 +27,9 @@
, xkeyboard_config
, runCommand
}:
let
pname = "gnome-flashback";
version = "3.36.3";
version = "3.37.2";
# From data/sessions/Makefile.am
requiredComponentsCommon = [
@ -55,13 +54,13 @@ let
"org.gnome.SettingsDaemon.Wacom"
"org.gnome.SettingsDaemon.XSettings"
];
requiredComponents = wmName: "RequiredComponents=${stdenv.lib.concatStringsSep ";" ([wmName] ++ requiredComponentsCommon ++ requiredComponentsGsd)};";
requiredComponents = wmName: "RequiredComponents=${stdenv.lib.concatStringsSep ";" ([ wmName ] ++ requiredComponentsCommon ++ requiredComponentsGsd)};";
gnome-flashback = stdenv.mkDerivation rec {
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
sha256 = "19y1a4kq6db6a19basss76l4rypiz0lwr32ajli1ra1d1yj9xfid";
sha256 = "0lz6icgng8ri4sdi3lkdsyvxzfvlkayn85b5346g76vc1w5y03db";
};
# make .desktop Execs absolute
@ -143,44 +142,46 @@ let
'';
};
gnomeSession = writeTextFile {
name = "gnome-flashback-${wmName}-gnome-session";
destination = "/share/gnome-session/sessions/gnome-flashback-${wmName}.session";
text = ''
[GNOME Session]
Name=GNOME Flashback (${wmLabel})
${requiredComponents wmName}
gnomeSession = writeTextFile {
name = "gnome-flashback-${wmName}-gnome-session";
destination = "/share/gnome-session/sessions/gnome-flashback-${wmName}.session";
text = ''
[GNOME Session]
Name=GNOME Flashback (${wmLabel})
${requiredComponents wmName}
'';
};
executable = writeShellScriptBin "gnome-flashback-${wmName}" ''
if [ -z $XDG_CURRENT_DESKTOP ]; then
export XDG_CURRENT_DESKTOP="GNOME-Flashback:GNOME"
fi
export XDG_DATA_DIRS=${wmApplication}/share:${gnomeSession}/share:${gnome-flashback}/share:${gnome-panel}/share:$XDG_DATA_DIRS
exec ${gnome-session}/bin/gnome-session --session=gnome-flashback-${wmName} "$@"
'';
in
writeTextFile
{
name = "gnome-flashback-${wmName}-xsession";
destination = "/share/xsessions/gnome-flashback-${wmName}.desktop";
text = ''
[Desktop Entry]
Name=GNOME Flashback (${wmLabel})
Comment=This session logs you into GNOME Flashback with ${wmLabel}
Exec=${executable}/bin/gnome-flashback-${wmName}
TryExec=${wmCommand}
Type=Application
DesktopNames=GNOME-Flashback;GNOME;
'';
} // {
providedSessions = [ "gnome-flashback-${wmName}" ];
};
executable = writeShellScriptBin "gnome-flashback-${wmName}" ''
if [ -z $XDG_CURRENT_DESKTOP ]; then
export XDG_CURRENT_DESKTOP="GNOME-Flashback:GNOME"
fi
export XDG_DATA_DIRS=${wmApplication}/share:${gnomeSession}/share:${gnome-flashback}/share:${gnome-panel}/share:$XDG_DATA_DIRS
exec ${gnome-session}/bin/gnome-session --session=gnome-flashback-${wmName} "$@"
'';
in writeTextFile {
name = "gnome-flashback-${wmName}-xsession";
destination = "/share/xsessions/gnome-flashback-${wmName}.desktop";
text = ''
[Desktop Entry]
Name=GNOME Flashback (${wmLabel})
Comment=This session logs you into GNOME Flashback with ${wmLabel}
Exec=${executable}/bin/gnome-flashback-${wmName}
TryExec=${wmCommand}
Type=Application
DesktopNames=GNOME-Flashback;GNOME;
'';
} // {
providedSessions = [ "gnome-flashback-${wmName}" ];
};
mkSystemdTargetForWm = { wmName }:
runCommand "gnome-flashback-${wmName}.target" {} ''
runCommand "gnome-flashback-${wmName}.target" { } ''
mkdir -p $out/lib/systemd/user
cp "${gnome-flashback}/lib/systemd/user/gnome-session-x11@gnome-flashback-metacity.target" \
"$out/lib/systemd/user/gnome-session-x11@gnome-flashback-${wmName}.target"
@ -195,4 +196,5 @@ let
platforms = platforms.linux;
};
};
in gnome-flashback
in
gnome-flashback