diff options
author | Joel <joel@joel.tokyo> | 2022-02-02 12:10:03 +1000 |
---|---|---|
committer | Jonathan Ringer <jonringer@users.noreply.github.com> | 2022-02-12 08:36:43 -0800 |
commit | 79513116436ade94d370e451ba18b9948f215335 (patch) | |
tree | f179f152626b06f6ea8e4e91922512050d437658 /pkgs/applications/window-managers | |
parent | 852bd9392aeed382d668fb6465257363a7ffa8b5 (diff) | |
download | nixpkgs-79513116436ade94d370e451ba18b9948f215335.tar nixpkgs-79513116436ade94d370e451ba18b9948f215335.tar.gz nixpkgs-79513116436ade94d370e451ba18b9948f215335.tar.bz2 nixpkgs-79513116436ade94d370e451ba18b9948f215335.tar.lz nixpkgs-79513116436ade94d370e451ba18b9948f215335.tar.xz nixpkgs-79513116436ade94d370e451ba18b9948f215335.tar.zst nixpkgs-79513116436ade94d370e451ba18b9948f215335.zip |
qtile: restore restart patch
Fixes #139568
Diffstat (limited to 'pkgs/applications/window-managers')
-rw-r--r-- | pkgs/applications/window-managers/qtile/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/window-managers/qtile/fix-restart.patch | 22 |
2 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/applications/window-managers/qtile/default.nix b/pkgs/applications/window-managers/qtile/default.nix index a505c852a95..c4a33628e13 100644 --- a/pkgs/applications/window-managers/qtile/default.nix +++ b/pkgs/applications/window-managers/qtile/default.nix @@ -12,6 +12,10 @@ let sha256 = "TRmul3t//izJRdViTvxFz29JZeGYsWc7WsJjagQ35nw="; }; + patches = [ + ./fix-restart.patch # https://github.com/NixOS/nixpkgs/issues/139568 + ]; + postPatch = '' substituteInPlace libqtile/pangocffi.py \ --replace libgobject-2.0.so.0 ${glib.out}/lib/libgobject-2.0.so.0 \ diff --git a/pkgs/applications/window-managers/qtile/fix-restart.patch b/pkgs/applications/window-managers/qtile/fix-restart.patch new file mode 100644 index 00000000000..eca4f086634 --- /dev/null +++ b/pkgs/applications/window-managers/qtile/fix-restart.patch @@ -0,0 +1,22 @@ +diff --git a/libqtile/core/lifecycle.py b/libqtile/core/lifecycle.py +index 0d4d119d..c37d1799 100644 +--- a/libqtile/core/lifecycle.py ++++ b/libqtile/core/lifecycle.py +@@ -25,7 +25,7 @@ class LifeCycle: + + def _atexit(self) -> None: + if self.behavior is Behavior.RESTART: +- argv = [sys.executable] + sys.argv ++ argv = sys.argv + if "--no-spawn" not in argv: + argv.append("--no-spawn") + argv = [s for s in argv if not s.startswith("--with-state")] +@@ -33,7 +33,7 @@ class LifeCycle: + argv.append("--with-state=" + self.state_file) + logger.warning("Restarting Qtile with os.execv(...)") + # No other code will execute after the following line does +- os.execv(sys.executable, argv) ++ os.execv(sys.argv[0], argv) + elif self.behavior is Behavior.TERMINATE: + logger.warning("Qtile will now terminate") + elif self.behavior is Behavior.NONE: |