diff options
author | Michael Weiss <dev.primeos@gmail.com> | 2021-05-13 20:48:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-13 20:48:55 +0200 |
commit | 60f2af59385bb58b57df3e0df621dbb216fcd39e (patch) | |
tree | 44c9cf455780befe4c7282f5574b585dee577bee /pkgs/applications/window-managers/sway/wrapper.nix | |
parent | 7500267ed9a32cd9799f616e811fa306ed70a950 (diff) | |
parent | 00e8e5b123f8f8a29b88f7f06ceb9f0b48c86c93 (diff) | |
download | nixpkgs-60f2af59385bb58b57df3e0df621dbb216fcd39e.tar nixpkgs-60f2af59385bb58b57df3e0df621dbb216fcd39e.tar.gz nixpkgs-60f2af59385bb58b57df3e0df621dbb216fcd39e.tar.bz2 nixpkgs-60f2af59385bb58b57df3e0df621dbb216fcd39e.tar.lz nixpkgs-60f2af59385bb58b57df3e0df621dbb216fcd39e.tar.xz nixpkgs-60f2af59385bb58b57df3e0df621dbb216fcd39e.tar.zst nixpkgs-60f2af59385bb58b57df3e0df621dbb216fcd39e.zip |
Merge pull request #122605 from primeos/nixos-sway-extend-default-configuration
nixos/sway: Extend the default configuration for NixOS
Diffstat (limited to 'pkgs/applications/window-managers/sway/wrapper.nix')
-rw-r--r-- | pkgs/applications/window-managers/sway/wrapper.nix | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/pkgs/applications/window-managers/sway/wrapper.nix b/pkgs/applications/window-managers/sway/wrapper.nix index 964828fdaba..07459295d75 100644 --- a/pkgs/applications/window-managers/sway/wrapper.nix +++ b/pkgs/applications/window-managers/sway/wrapper.nix @@ -4,6 +4,8 @@ , withBaseWrapper ? true, extraSessionCommands ? "", dbus , withGtkWrapper ? false, wrapGAppsHook, gdk-pixbuf, glib, gtk3 , extraOptions ? [] # E.g.: [ "--verbose" ] +# Used by the NixOS module: +, isNixOS ? false }: assert extraSessionCommands != "" -> withBaseWrapper; @@ -11,6 +13,7 @@ assert extraSessionCommands != "" -> withBaseWrapper; with lib; let + sway = sway-unwrapped.override { inherit isNixOS; }; baseWrapper = writeShellScriptBin "sway" '' set -o errexit if [ ! "$_SWAY_WRAPPER_ALREADY_EXECUTED" ]; then @@ -20,16 +23,16 @@ let fi if [ "$DBUS_SESSION_BUS_ADDRESS" ]; then export DBUS_SESSION_BUS_ADDRESS - exec ${sway-unwrapped}/bin/sway "$@" + exec ${sway}/bin/sway "$@" else - exec ${dbus}/bin/dbus-run-session ${sway-unwrapped}/bin/sway "$@" + exec ${dbus}/bin/dbus-run-session ${sway}/bin/sway "$@" fi ''; in symlinkJoin { - name = "sway-${sway-unwrapped.version}"; + name = "sway-${sway.version}"; paths = (optional withBaseWrapper baseWrapper) - ++ [ sway-unwrapped ]; + ++ [ sway ]; nativeBuildInputs = [ makeWrapper ] ++ (optional withGtkWrapper wrapGAppsHook); @@ -49,5 +52,5 @@ in symlinkJoin { passthru.providedSessions = [ "sway" ]; - inherit (sway-unwrapped) meta; + inherit (sway) meta; } |