13 gsettings-desktop-schemas,
36 # From data/sessions/Makefile.am
37 requiredComponentsCommon =
38 enableGnomePanel: [ "gnome-flashback" ] ++ lib.optional enableGnomePanel "gnome-panel";
39 requiredComponentsGsd = [
40 "org.gnome.SettingsDaemon.A11ySettings"
41 "org.gnome.SettingsDaemon.Color"
42 "org.gnome.SettingsDaemon.Datetime"
43 "org.gnome.SettingsDaemon.Housekeeping"
44 "org.gnome.SettingsDaemon.Keyboard"
45 "org.gnome.SettingsDaemon.MediaKeys"
46 "org.gnome.SettingsDaemon.Power"
47 "org.gnome.SettingsDaemon.PrintNotifications"
48 "org.gnome.SettingsDaemon.Rfkill"
49 "org.gnome.SettingsDaemon.ScreensaverProxy"
50 "org.gnome.SettingsDaemon.Sharing"
51 "org.gnome.SettingsDaemon.Smartcard"
52 "org.gnome.SettingsDaemon.Sound"
53 "org.gnome.SettingsDaemon.UsbProtection"
54 "org.gnome.SettingsDaemon.Wacom"
55 "org.gnome.SettingsDaemon.XSettings"
58 wmName: enableGnomePanel:
59 "RequiredComponents=${
60 lib.concatStringsSep ";" (
61 [ wmName ] ++ requiredComponentsCommon enableGnomePanel ++ requiredComponentsGsd
65 stdenv.mkDerivation (finalAttrs: {
66 pname = "gnome-flashback";
70 url = "mirror://gnome/sources/gnome-flashback/${lib.versions.majorMinor finalAttrs.version}/gnome-flashback-${finalAttrs.version}.tar.xz";
71 hash = "sha256-gkNa4wLNZK6xG25M0YTaj/+qzSSFFf+gIidZXDzPne4=";
74 # make .desktop Execs absolute
77 +++ data/applications/gnome-flashback.desktop.in
80 +Exec=$out/bin/gnome-flashback
85 # Check that our expected RequiredComponents match the stock session files, but then don't install them.
86 # They can be installed using mkSessionForWm.
87 grep '${requiredComponents "metacity" true}' $out/share/gnome-session/sessions/gnome-flashback-metacity.session || (echo "RequiredComponents have changed, please update gnome-flashback/default.nix."; false)
89 rm -r $out/share/gnome-session
90 rm -r $out/share/xsessions
91 rm $out/libexec/gnome-flashback-metacity
106 gsettings-desktop-schemas
124 enableParallelBuilding = true;
126 PKG_CONFIG_LIBGNOME_PANEL_LAYOUTSDIR = "${placeholder "out"}/share/gnome-panel/layouts";
127 PKG_CONFIG_LIBGNOME_PANEL_MODULESDIR = "${placeholder "out"}/lib/gnome-panel/modules";
130 updateScript = gnome.updateScript {
131 packageName = "gnome-flashback";
132 versionPolicy = "odd-unstable";
142 name = "gnome-flashback-${wmName}-wm";
143 destination = "/share/applications/${wmName}.desktop";
151 X-GNOME-WMName=${wmLabel}
152 X-GNOME-Autostart-Phase=WindowManager
153 X-GNOME-Provides=windowmanager
154 X-GNOME-Autostart-Notify=false
165 name = "gnome-flashback-${wmName}-gnome-session";
166 destination = "/share/gnome-session/sessions/gnome-flashback-${wmName}.session";
169 Name=GNOME Flashback (${wmLabel})
170 ${requiredComponents wmName enableGnomePanel}
181 name = "gnome-flashback-${wmName}-xsession";
182 destination = "/share/xsessions/gnome-flashback-${wmName}.desktop";
185 Name=GNOME Flashback (${wmLabel})
186 Comment=This session logs you into GNOME Flashback with ${wmLabel}
187 Exec=${gnome-session}/bin/gnome-session --session=gnome-flashback-${wmName}
190 DesktopNames=GNOME-Flashback;GNOME;
194 providedSessions = [ "gnome-flashback-${wmName}" ];
197 mkSystemdTargetForWm =
204 runCommand "gnome-flashback-${wmName}.target" { } ''
205 mkdir -p $out/lib/systemd/user
206 cp -r "${finalAttrs.finalPackage}/lib/systemd/user/gnome-session@gnome-flashback-metacity.target.d" \
207 "$out/lib/systemd/user/gnome-session@gnome-flashback-${wmName}.target.d"
211 inherit (nixosTests) gnome-flashback;
216 description = "GNOME 2.x-like session for GNOME 3";
217 mainProgram = "gnome-flashback";
218 homepage = "https://gitlab.gnome.org/GNOME/gnome-flashback";
219 changelog = "https://gitlab.gnome.org/GNOME/gnome-flashback/-/blob/${finalAttrs.version}/NEWS?ref_type=tags";
220 license = licenses.gpl2;
221 maintainers = teams.gnome.members;
222 platforms = platforms.linux;