sway: remove with lib;

This commit is contained in:
éclairevoyant 2024-03-28 09:18:49 -04:00
parent 56cfc87a73
commit 3513704e13
No known key found for this signature in database
GPG Key ID: E3813AEAA02DB54B

View File

@ -13,9 +13,12 @@
assert extraSessionCommands != "" -> withBaseWrapper;
with lib;
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; });
baseWrapper = writeShellScriptBin sway.meta.mainProgram ''
set -o errexit
@ -26,13 +29,13 @@ let
fi
if [ "$DBUS_SESSION_BUS_ADDRESS" ]; then
export DBUS_SESSION_BUS_ADDRESS
exec ${lib.getExe sway} "$@"
exec ${getExe sway} "$@"
else
exec ${lib.optionalString dbusSupport "${dbus}/bin/dbus-run-session"} ${lib.getExe sway} "$@"
exec ${optionalString dbusSupport "${dbus}/bin/dbus-run-session"} ${getExe sway} "$@"
fi
'';
in symlinkJoin rec {
pname = lib.replaceStrings ["-unwrapped"] [""] sway.pname;
pname = replaceStrings ["-unwrapped"] [""] sway.pname;
inherit (sway) version;
name = "${pname}-${version}";