Merge pull request #109647 from deviant/remove-swaybg-from-path

sway: remove swaybg from path

authored by

Michael Weiss and committed by
GitHub
fdc1e374 72b0cc17

+18 -3
+6 -1
pkgs/applications/window-managers/sway/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, makeWrapper 1 + { lib, stdenv, fetchFromGitHub, substituteAll, swaybg 2 2 , meson, ninja, pkg-config, wayland, scdoc 3 3 , libxkbcommon, pcre, json_c, dbus, libevdev 4 4 , pango, cairo, libinput, libcap, pam, gdk-pixbuf, librsvg ··· 19 19 patches = [ 20 20 ./sway-config-no-nix-store-references.patch 21 21 ./load-configuration-from-etc.patch 22 + 23 + (substituteAll { 24 + src = ./fix-paths.patch; 25 + inherit swaybg; 26 + }) 22 27 ]; 23 28 24 29 nativeBuildInputs = [
+11
pkgs/applications/window-managers/sway/fix-paths.patch
··· 1 + --- a/sway/config.c 2 + +++ b/sway/config.c 3 + @@ -276,7 +276,7 @@ 4 + 5 + if (!(config->active_bar_modifiers = create_list())) goto cleanup; 6 + 7 + - if (!(config->swaybg_command = strdup("swaybg"))) goto cleanup; 8 + + if (!(config->swaybg_command = strdup("@swaybg@/bin/swaybg"))) goto cleanup; 9 + 10 + if (!(config->config_chain = create_list())) goto cleanup; 11 + config->current_config_path = NULL;
+1 -2
pkgs/applications/window-managers/sway/wrapper.nix
··· 1 1 { lib, stdenv 2 - , sway-unwrapped, swaybg 2 + , sway-unwrapped 3 3 , makeWrapper, symlinkJoin, writeShellScriptBin 4 4 , withBaseWrapper ? true, extraSessionCommands ? "", dbus 5 5 , withGtkWrapper ? false, wrapGAppsHook, gdk-pixbuf, glib, gtk3 ··· 42 42 ${optionalString withGtkWrapper "gappsWrapperArgsHook"} 43 43 44 44 wrapProgram $out/bin/sway \ 45 - --prefix PATH : "${swaybg}/bin" \ 46 45 ${optionalString withGtkWrapper ''"''${gappsWrapperArgs[@]}"''} \ 47 46 ${optionalString (extraOptions != []) "${concatMapStrings (x: " --add-flags " + x) extraOptions}"} 48 47 '';