From 249261f0dde371b98a41cb6cee2af61f95043dcd Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Sun, 21 May 2023 01:44:48 +1000 Subject: [PATCH] kitti3: init at unstable-2021-09-11 --- .../i3/kitti3-fix-build-system.patch | 21 ++++++++++ .../window-managers/i3/kitti3.nix | 40 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 63 insertions(+) create mode 100644 pkgs/applications/window-managers/i3/kitti3-fix-build-system.patch create mode 100644 pkgs/applications/window-managers/i3/kitti3.nix diff --git a/pkgs/applications/window-managers/i3/kitti3-fix-build-system.patch b/pkgs/applications/window-managers/i3/kitti3-fix-build-system.patch new file mode 100644 index 000000000000..06a2ac60bb32 --- /dev/null +++ b/pkgs/applications/window-managers/i3/kitti3-fix-build-system.patch @@ -0,0 +1,21 @@ +commit 410e98569c87469672086d4144f7ca0f2ee08fb7 +Author: Michael Hoang +Date: Sun May 21 00:13:37 2023 +1000 + + Allow project to be built with just `pip` +--- + pyproject.toml | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/pyproject.toml b/pyproject.toml +index 10ed786..574e42a 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -1,3 +1,7 @@ ++[build-system] ++requires = ["poetry-core"] ++build-backend = "poetry.core.masonry.api" ++ + [tool.poetry] + name = "kitti3" + version = "0.5.1" diff --git a/pkgs/applications/window-managers/i3/kitti3.nix b/pkgs/applications/window-managers/i3/kitti3.nix new file mode 100644 index 000000000000..63e1224a316b --- /dev/null +++ b/pkgs/applications/window-managers/i3/kitti3.nix @@ -0,0 +1,40 @@ +{ buildPythonApplication +, fetchFromGitHub +, poetry-core +, i3ipc +, lib +}: + +buildPythonApplication rec { + pname = "kitti3"; + version = "unstable-2021-09-11"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "LandingEllipse"; + repo = pname; + rev = "f9f94c8b9f8b61a9d085206ada470cfe755a2a92"; + hash = "sha256-bcIzbDpIe2GKS9EcVqpjwz0IG2ixNMn06OIQpZ7PeH0="; + }; + + patches = [ + # Fixes `build-system` not being specified in `pyproject.toml` + # https://github.com/LandingEllipse/kitti3/pull/25 + ./kitti3-fix-build-system.patch + ]; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + i3ipc + ]; + + meta = with lib; { + homepage = "https://github.com/LandingEllipse/kitti3"; + description = "Kitty drop-down service for sway & i3wm"; + license = licenses.bsd3; + maintainers = with maintainers; [ Enzime ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 42bfd2693429..46d48169b251 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31424,6 +31424,8 @@ with pkgs; i3-wk-switch = callPackage ../applications/window-managers/i3/wk-switch.nix { }; + kitti3 = python3.pkgs.callPackage ../applications/window-managers/i3/kitti3.nix { }; + waybox = callPackage ../applications/window-managers/waybox { }; workstyle = callPackage ../applications/window-managers/i3/workstyle.nix { };