summary refs log tree commit diff
path: root/pkgs/applications/window-managers
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2021-01-19 12:01:59 +0100
committerGitHub <noreply@github.com>2021-01-19 12:01:59 +0100
commitfdc1e37440ac511ef8d4ac13942550293255f47d (patch)
tree04a89964937f24f8f1756126199c5aafed007b34 /pkgs/applications/window-managers
parent72b0cc170e8783ce9359bb3330edbe4b548ca0ec (diff)
parent29b14dfd9bb21111a86d7ca22609e69b24ef19f9 (diff)
downloadnixpkgs-fdc1e37440ac511ef8d4ac13942550293255f47d.tar
nixpkgs-fdc1e37440ac511ef8d4ac13942550293255f47d.tar.gz
nixpkgs-fdc1e37440ac511ef8d4ac13942550293255f47d.tar.bz2
nixpkgs-fdc1e37440ac511ef8d4ac13942550293255f47d.tar.lz
nixpkgs-fdc1e37440ac511ef8d4ac13942550293255f47d.tar.xz
nixpkgs-fdc1e37440ac511ef8d4ac13942550293255f47d.tar.zst
nixpkgs-fdc1e37440ac511ef8d4ac13942550293255f47d.zip
Merge pull request #109647 from deviant/remove-swaybg-from-path
sway: remove swaybg from path
Diffstat (limited to 'pkgs/applications/window-managers')
-rw-r--r--pkgs/applications/window-managers/sway/default.nix7
-rw-r--r--pkgs/applications/window-managers/sway/fix-paths.patch11
-rw-r--r--pkgs/applications/window-managers/sway/wrapper.nix3
3 files changed, 18 insertions, 3 deletions
diff --git a/pkgs/applications/window-managers/sway/default.nix b/pkgs/applications/window-managers/sway/default.nix
index 2b3c51a7340..1798c8235d0 100644
--- a/pkgs/applications/window-managers/sway/default.nix
+++ b/pkgs/applications/window-managers/sway/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, makeWrapper
+{ lib, stdenv, fetchFromGitHub, substituteAll, swaybg
 , meson, ninja, pkg-config, wayland, scdoc
 , libxkbcommon, pcre, json_c, dbus, libevdev
 , pango, cairo, libinput, libcap, pam, gdk-pixbuf, librsvg
@@ -19,6 +19,11 @@ stdenv.mkDerivation rec {
   patches = [
     ./sway-config-no-nix-store-references.patch
     ./load-configuration-from-etc.patch
+
+    (substituteAll {
+      src = ./fix-paths.patch;
+      inherit swaybg;
+    })
   ];
 
   nativeBuildInputs = [
diff --git a/pkgs/applications/window-managers/sway/fix-paths.patch b/pkgs/applications/window-managers/sway/fix-paths.patch
new file mode 100644
index 00000000000..c52f65b146b
--- /dev/null
+++ b/pkgs/applications/window-managers/sway/fix-paths.patch
@@ -0,0 +1,11 @@
+--- a/sway/config.c
++++ b/sway/config.c
+@@ -276,7 +276,7 @@
+ 
+ 	if (!(config->active_bar_modifiers = create_list())) goto cleanup;
+ 
+-	if (!(config->swaybg_command = strdup("swaybg"))) goto cleanup;
++	if (!(config->swaybg_command = strdup("@swaybg@/bin/swaybg"))) goto cleanup;
+ 
+ 	if (!(config->config_chain = create_list())) goto cleanup;
+ 	config->current_config_path = NULL;
diff --git a/pkgs/applications/window-managers/sway/wrapper.nix b/pkgs/applications/window-managers/sway/wrapper.nix
index fe78e1a9ff9..0a80ce70e03 100644
--- a/pkgs/applications/window-managers/sway/wrapper.nix
+++ b/pkgs/applications/window-managers/sway/wrapper.nix
@@ -1,5 +1,5 @@
 { lib, stdenv
-, sway-unwrapped, swaybg
+, sway-unwrapped
 , makeWrapper, symlinkJoin, writeShellScriptBin
 , withBaseWrapper ? true, extraSessionCommands ? "", dbus
 , withGtkWrapper ? false, wrapGAppsHook, gdk-pixbuf, glib, gtk3
@@ -42,7 +42,6 @@ in symlinkJoin {
     ${optionalString withGtkWrapper "gappsWrapperArgsHook"}
 
     wrapProgram $out/bin/sway \
-      --prefix PATH : "${swaybg}/bin" \
       ${optionalString withGtkWrapper ''"''${gappsWrapperArgs[@]}"''} \
       ${optionalString (extraOptions != []) "${concatMapStrings (x: " --add-flags " + x) extraOptions}"}
   '';