mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
sway: remove with lib;
This commit is contained in:
parent
56cfc87a73
commit
3513704e13
@ -13,9 +13,12 @@
|
|||||||
|
|
||||||
assert extraSessionCommands != "" -> withBaseWrapper;
|
assert extraSessionCommands != "" -> withBaseWrapper;
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
|
inherit (builtins) replaceStrings;
|
||||||
|
inherit (lib.lists) optional optionals;
|
||||||
|
inherit (lib.meta) getExe;
|
||||||
|
inherit (lib.strings) concatMapStrings optionalString;
|
||||||
|
|
||||||
sway = sway-unwrapped.overrideAttrs (oa: { inherit isNixOS enableXWayland; });
|
sway = sway-unwrapped.overrideAttrs (oa: { inherit isNixOS enableXWayland; });
|
||||||
baseWrapper = writeShellScriptBin sway.meta.mainProgram ''
|
baseWrapper = writeShellScriptBin sway.meta.mainProgram ''
|
||||||
set -o errexit
|
set -o errexit
|
||||||
@ -26,13 +29,13 @@ let
|
|||||||
fi
|
fi
|
||||||
if [ "$DBUS_SESSION_BUS_ADDRESS" ]; then
|
if [ "$DBUS_SESSION_BUS_ADDRESS" ]; then
|
||||||
export DBUS_SESSION_BUS_ADDRESS
|
export DBUS_SESSION_BUS_ADDRESS
|
||||||
exec ${lib.getExe sway} "$@"
|
exec ${getExe sway} "$@"
|
||||||
else
|
else
|
||||||
exec ${lib.optionalString dbusSupport "${dbus}/bin/dbus-run-session"} ${lib.getExe sway} "$@"
|
exec ${optionalString dbusSupport "${dbus}/bin/dbus-run-session"} ${getExe sway} "$@"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
in symlinkJoin rec {
|
in symlinkJoin rec {
|
||||||
pname = lib.replaceStrings ["-unwrapped"] [""] sway.pname;
|
pname = replaceStrings ["-unwrapped"] [""] sway.pname;
|
||||||
inherit (sway) version;
|
inherit (sway) version;
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user