12 , gsettings-desktop-schemas
33 pname = "gnome-flashback";
36 # From data/sessions/Makefile.am
37 requiredComponentsCommon = enableGnomePanel:
39 ++ lib.optional enableGnomePanel "gnome-panel";
40 requiredComponentsGsd = [
41 "org.gnome.SettingsDaemon.A11ySettings"
42 "org.gnome.SettingsDaemon.Color"
43 "org.gnome.SettingsDaemon.Datetime"
44 "org.gnome.SettingsDaemon.Housekeeping"
45 "org.gnome.SettingsDaemon.Keyboard"
46 "org.gnome.SettingsDaemon.MediaKeys"
47 "org.gnome.SettingsDaemon.Power"
48 "org.gnome.SettingsDaemon.PrintNotifications"
49 "org.gnome.SettingsDaemon.Rfkill"
50 "org.gnome.SettingsDaemon.ScreensaverProxy"
51 "org.gnome.SettingsDaemon.Sharing"
52 "org.gnome.SettingsDaemon.Smartcard"
53 "org.gnome.SettingsDaemon.Sound"
54 "org.gnome.SettingsDaemon.UsbProtection"
55 "org.gnome.SettingsDaemon.Wacom"
56 "org.gnome.SettingsDaemon.XSettings"
58 requiredComponents = wmName: enableGnomePanel: "RequiredComponents=${lib.concatStringsSep ";" ([ wmName ] ++ requiredComponentsCommon enableGnomePanel ++ requiredComponentsGsd)};";
60 gnome-flashback = stdenv.mkDerivation rec {
61 name = "${pname}-${version}";
64 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${name}.tar.xz";
65 hash = "sha256-ugRhPNrbYr2iBkN8BHKZ4WAlzeG9gJXglKp3dpx4YDo=";
68 # make .desktop Execs absolute
71 +++ data/applications/gnome-flashback.desktop.in
74 +Exec=$out/bin/gnome-flashback
79 # Check that our expected RequiredComponents match the stock session files, but then don't install them.
80 # They can be installed using mkSessionForWm.
81 grep '${requiredComponents "metacity" true}' $out/share/gnome-session/sessions/gnome-flashback-metacity.session || (echo "RequiredComponents have changed, please update gnome-flashback/default.nix."; false)
83 rm -r $out/share/gnome-session
84 rm -r $out/share/xsessions
85 rm $out/libexec/gnome-flashback-metacity
100 gsettings-desktop-schemas
118 enableParallelBuilding = true;
120 PKG_CONFIG_LIBGNOME_PANEL_LAYOUTSDIR = "${placeholder "out"}/share/gnome-panel/layouts";
121 PKG_CONFIG_LIBGNOME_PANEL_MODULESDIR = "${placeholder "out"}/lib/gnome-panel/modules";
124 updateScript = gnome.updateScript {
126 attrPath = "gnome.${pname}";
127 versionPolicy = "odd-unstable";
130 mkWmApplication = { wmName, wmLabel, wmCommand }:
132 name = "gnome-flashback-${wmName}-wm";
133 destination = "/share/applications/${wmName}.desktop";
141 X-GNOME-WMName=${wmLabel}
142 X-GNOME-Autostart-Phase=WindowManager
143 X-GNOME-Provides=windowmanager
144 X-GNOME-Autostart-Notify=false
148 mkGnomeSession = { wmName, wmLabel, enableGnomePanel }:
150 name = "gnome-flashback-${wmName}-gnome-session";
151 destination = "/share/gnome-session/sessions/gnome-flashback-${wmName}.session";
154 Name=GNOME Flashback (${wmLabel})
155 ${requiredComponents wmName enableGnomePanel}
159 mkSessionForWm = { wmName, wmLabel, wmCommand }:
162 name = "gnome-flashback-${wmName}-xsession";
163 destination = "/share/xsessions/gnome-flashback-${wmName}.desktop";
166 Name=GNOME Flashback (${wmLabel})
167 Comment=This session logs you into GNOME Flashback with ${wmLabel}
168 Exec=${gnome-session}/bin/gnome-session --session=gnome-flashback-${wmName}
171 DesktopNames=GNOME-Flashback;GNOME;
174 providedSessions = [ "gnome-flashback-${wmName}" ];
177 mkSystemdTargetForWm = { wmName, wmLabel, wmCommand, enableGnomePanel }:
178 runCommand "gnome-flashback-${wmName}.target" { } ''
179 mkdir -p $out/lib/systemd/user
180 cp -r "${gnome-flashback}/lib/systemd/user/gnome-session@gnome-flashback-metacity.target.d" \
181 "$out/lib/systemd/user/gnome-session@gnome-flashback-${wmName}.target.d"
186 description = "GNOME 2.x-like session for GNOME 3";
187 mainProgram = "gnome-flashback";
188 homepage = "https://gitlab.gnome.org/GNOME/gnome-flashback";
189 license = licenses.gpl2;
190 maintainers = teams.gnome.members;
191 platforms = platforms.linux;