From 8e3bf1d6b430479ea0c04a2eb725dd8e29a0c06f Mon Sep 17 00:00:00 2001 From: Ben Lorenz Date: Thu, 4 Apr 2024 16:12:06 +0200 Subject: [PATCH 1/2] maintainers: add bnlrnz --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 9f5eedb646c1..0388620f7214 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -2693,6 +2693,12 @@ github = "bmwalters"; githubId = 4380777; }; + bnlrnz = { + github = "bnlrnz"; + githubId = 11310385; + name = "Ben Lorenz"; + email = "bnlrnz@gmail.com"; + }; bobakker = { email = "bobakk3r@gmail.com"; github = "bobakker"; From 00090a6429493801f9167cfb978997c17ccd8a5b Mon Sep 17 00:00:00 2001 From: Ben Lorenz Date: Sat, 13 Apr 2024 11:24:56 +0200 Subject: [PATCH 2/2] wlr-layout-ui: init at 1.4.7 patched version check, fixed postInstall --- pkgs/by-name/wl/wlr-layout-ui/package.nix | 48 +++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 pkgs/by-name/wl/wlr-layout-ui/package.nix diff --git a/pkgs/by-name/wl/wlr-layout-ui/package.nix b/pkgs/by-name/wl/wlr-layout-ui/package.nix new file mode 100644 index 000000000000..f115bf12159b --- /dev/null +++ b/pkgs/by-name/wl/wlr-layout-ui/package.nix @@ -0,0 +1,48 @@ +{ lib +, python3 +, fetchFromGitHub +}: + +python3.pkgs.buildPythonApplication rec { + pname = "wlr-layout-ui"; + version = "1.4.7"; + pyproject = true; + + src = fetchFromGitHub { + owner = "fdev31"; + repo = "wlr-layout-ui"; + rev = "${version}"; + hash = "sha256-3NV02/Lk43h3r17jwmSAqx7wofaHFJKDh+vaWwU17Gw="; + }; + + postPatch = '' + # The hyprland default.nix patches the version.h of hyprland so that the + # version info moves to the commit key. + substituteInPlace src/wlr_layout_ui/screens.py \ + --replace 'json.loads(subprocess.getoutput("hyprctl -j version"))["tag"]'\ + 'json.loads(subprocess.getoutput("hyprctl -j version"))["commit"]' + ''; + + nativeBuildInputs = [ + python3.pkgs.poetry-core + ]; + + propagatedBuildInputs = with python3.pkgs; [ + pyglet + tomli + tomli-w + ]; + + postInstall = '' + install -Dm644 files/wlr-layout-ui.desktop $out/share/applications/wlr-layout-ui.desktop + ''; + + meta = with lib; { + description = "A simple GUI to setup the screens layout on wlroots based systems"; + homepage = "https://github.com/fdev31/wlr-layout-ui/"; + maintainers = with maintainers; [ bnlrnz ]; + license = licenses.mit; + mainProgram = "wlrlui"; + platforms = subtractLists platforms.darwin platforms.unix; + }; +}