mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 14:45:27 +00:00
nixos/sessionPackages: provide session names in passthru
We want access to the valid session names at evaluation time.
This commit is contained in:
parent
d362df6682
commit
dd7144b860
|
@ -24,6 +24,7 @@ let
|
|||
swayJoined = pkgs.symlinkJoin {
|
||||
name = "sway-joined";
|
||||
paths = [ swayWrapped swayPackage ];
|
||||
passthru.providedSessions = [ "sway" ];
|
||||
};
|
||||
in {
|
||||
options.programs.sway = {
|
||||
|
|
|
@ -263,7 +263,20 @@ in
|
|||
};
|
||||
|
||||
sessionPackages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
type = with types; listOf (package // {
|
||||
description = "package with provided sessions";
|
||||
check = p: assertMsg
|
||||
(package.check p && p ? providedSessions
|
||||
&& p.providedSessions != [] && all isString p.providedSessions)
|
||||
''
|
||||
Package, '${p.name}', did not specify any session names, as strings, in
|
||||
'passthru.providedSessions'. This is required when used as a session package.
|
||||
|
||||
The session names can be looked up in:
|
||||
${p}/share/xsessions
|
||||
${p}/share/wayland-sessions
|
||||
'';
|
||||
});
|
||||
default = [];
|
||||
description = ''
|
||||
A list of packages containing x11 or wayland session files to be passed to the display manager.
|
||||
|
|
|
@ -55,6 +55,7 @@ stdenv.mkDerivation rec {
|
|||
packageName = "gnome-session";
|
||||
attrPath = "gnome3.gnome-session";
|
||||
};
|
||||
providedSessions = [ "gnome" "gnome-xorg" ];
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -141,6 +141,8 @@ let
|
|||
Type=Application
|
||||
DesktopNames=GNOME-Flashback;GNOME;
|
||||
'';
|
||||
} // {
|
||||
providedSessions = [ "gnome-flashback-${wmName}" ];
|
||||
};
|
||||
|
||||
mkSystemdTargetForWm = { wmName }:
|
||||
|
|
|
@ -131,6 +131,7 @@ stdenv.mkDerivation rec {
|
|||
inherit repoName;
|
||||
attrPath = pname;
|
||||
};
|
||||
providedSessions = [ "pantheon" ];
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -43,6 +43,10 @@ stdenv.mkDerivation rec {
|
|||
|
||||
makeFlags = [ "PREFIX=${placeholder "out"}" ];
|
||||
|
||||
passthru = {
|
||||
providedSessions = [ "surf-display" ];
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Kiosk browser session manager based on the surf browser";
|
||||
homepage = "https://code.it-zukunft-schule.de/cgit/surf-display/";
|
||||
|
|
Loading…
Reference in a new issue