about summary refs log tree commit diff
path: root/pkgs/applications/window-managers
diff options
context:
space:
mode:
authorArjan Schrijver <github@anymore.nl>2023-05-10 14:51:37 +0200
committerArjan Schrijver <github@anymore.nl>2023-05-19 20:32:09 +0200
commitf35a3d2dcc7dc1d843d6759175288ac564c7bf32 (patch)
treeef2ecd9adeeb0f8bad4ebdb5d2b22f9d0118cd96 /pkgs/applications/window-managers
parent0a61fd3de2deb50b57ad7b3cc739e22f3140337a (diff)
qtile: move to python-modules
Diffstat (limited to 'pkgs/applications/window-managers')
-rw-r--r--pkgs/applications/window-managers/qtile/default.nix87
-rw-r--r--pkgs/applications/window-managers/qtile/fix-restart.patch22
-rw-r--r--pkgs/applications/window-managers/qtile/wrapper.nix9
3 files changed, 0 insertions, 118 deletions
diff --git a/pkgs/applications/window-managers/qtile/default.nix b/pkgs/applications/window-managers/qtile/default.nix
deleted file mode 100644
index 173dc919c74e9..0000000000000
--- a/pkgs/applications/window-managers/qtile/default.nix
+++ /dev/null
@@ -1,87 +0,0 @@
-{ lib
-, fetchFromGitHub
-, python3
-, python3Packages
-, mypy
-, glib
-, pango
-, pkg-config
-, libinput
-, libxkbcommon
-, wayland
-, wlroots
-, xcbutilcursor
-, pulseaudio
-}:
-
-python3Packages.buildPythonPackage rec {
-  pname = "qtile";
-  version = "0.22.1";
-
-  src = fetchFromGitHub {
-    owner = "qtile";
-    repo = "qtile";
-    rev = "v${version}";
-    hash = "sha256-HOyExVKOqZ4OeNM1/AiXQeiUV+EbSJLEjWEibm07ff8=";
-  };
-
-  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 \
-      --replace libpangocairo-1.0.so.0 ${pango.out}/lib/libpangocairo-1.0.so.0 \
-      --replace libpango-1.0.so.0 ${pango.out}/lib/libpango-1.0.so.0
-    substituteInPlace libqtile/backend/x11/xcursors.py \
-      --replace libxcb-cursor.so.0 ${xcbutilcursor.out}/lib/libxcb-cursor.so.0
-  '';
-
-  SETUPTOOLS_SCM_PRETEND_VERSION = version;
-
-  nativeBuildInputs = [
-    pkg-config
-  ] ++ (with python3Packages; [
-    setuptools-scm
-  ]);
-
-  propagatedBuildInputs = with python3Packages; [
-    xcffib
-    (cairocffi.override { withXcffib = true; })
-    setuptools
-    python-dateutil
-    dbus-python
-    dbus-next
-    mpd2
-    psutil
-    pyxdg
-    pygobject3
-    pywayland
-    pywlroots
-    xkbcommon
-    pulseaudio
-  ];
-
-  buildInputs = [
-    libinput
-    wayland
-    wlroots
-    libxkbcommon
-  ];
-
-  # for `qtile check`, needs `stubtest` and `mypy` commands
-  makeWrapperArgs = [
-    "--suffix PATH : ${lib.makeBinPath [ mypy ]}"
-  ];
-
-  doCheck = false; # Requires X server #TODO this can be worked out with the existing NixOS testing infrastructure.
-
-  meta = with lib; {
-    homepage = "http://www.qtile.org/";
-    license = licenses.mit;
-    description = "A small, flexible, scriptable tiling window manager written in Python";
-    platforms = platforms.linux;
-    maintainers = with maintainers; [ kamilchm arjan-s ];
-  };
-}
diff --git a/pkgs/applications/window-managers/qtile/fix-restart.patch b/pkgs/applications/window-managers/qtile/fix-restart.patch
deleted file mode 100644
index eca4f0866342f..0000000000000
--- a/pkgs/applications/window-managers/qtile/fix-restart.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-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:
diff --git a/pkgs/applications/window-managers/qtile/wrapper.nix b/pkgs/applications/window-managers/qtile/wrapper.nix
deleted file mode 100644
index 8cb5596a84468..0000000000000
--- a/pkgs/applications/window-managers/qtile/wrapper.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ python3, qtile-unwrapped }:
-(python3.withPackages (_: [ qtile-unwrapped ])).overrideAttrs (_: {
-  # otherwise will be exported as "env", this restores `nix search` behavior
-  name = "${qtile-unwrapped.pname}-${qtile-unwrapped.version}";
-  # export underlying qtile package
-  passthru = { unwrapped = qtile-unwrapped; };
-  # restore original qtile attrs
-  inherit (qtile-unwrapped) pname version meta;
-})