From c9c97fa99eb17760f3bc520a7779454cd55d4277 Mon Sep 17 00:00:00 2001 From: bokicoder <1556588440@qq.com> Date: Sun, 25 May 2025 18:46:24 +0800 Subject: [PATCH] niriswitcher: init at 0.5.2 --- pkgs/by-name/ni/niriswitcher/package.nix | 54 ++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 pkgs/by-name/ni/niriswitcher/package.nix diff --git a/pkgs/by-name/ni/niriswitcher/package.nix b/pkgs/by-name/ni/niriswitcher/package.nix new file mode 100644 index 000000000000..c40357fbae9b --- /dev/null +++ b/pkgs/by-name/ni/niriswitcher/package.nix @@ -0,0 +1,54 @@ +{ + lib, + python3Packages, + fetchFromGitHub, + wrapGAppsHook4, + gobject-introspection, + gtk4-layer-shell, + libadwaita, +}: + +python3Packages.buildPythonPackage rec { + pname = "niriswitcher"; + version = "0.5.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "isaksamsten"; + repo = "niriswitcher"; + tag = version; + hash = "sha256-jXnob/CJ3wrqYhbFRu7TnnnCrsKaDazD3t9lZoJVhdQ="; + }; + + build-system = [ python3Packages.hatchling ]; + + nativeBuildInputs = [ + wrapGAppsHook4 + gobject-introspection + ]; + + buildInputs = [ + gtk4-layer-shell + libadwaita + ]; + + dependencies = [ python3Packages.pygobject3 ]; + + dontWrapGApps = true; + + preFixup = '' + makeWrapperArgs+=( + ''${gappsWrapperArgs[@]} + --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ gtk4-layer-shell ]} + ) + ''; + + meta = { + description = "Application switcher for niri"; + homepage = "https://github.com/isaksamsten/niriswitcher"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ bokicoder ]; + mainProgram = "niriswitcher"; + platforms = lib.platforms.linux; + }; +}