Skip to content

Commit

Permalink
sway: remove with lib;
Browse files Browse the repository at this point in the history
  • Loading branch information
eclairevoyant committed Apr 29, 2024
1 parent 56cfc87 commit 3513704
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions pkgs/by-name/sw/sway/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}";

Expand Down

0 comments on commit 3513704

Please sign in to comment.