From cd2b6190335f18ce90bf21561f0a793d9dc6fb5b Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Wed, 14 Jan 2026 16:08:35 +0200 Subject: [PATCH 1/3] hyprland: remove git from buildInputs A common configurePhase stderr line was printed that might have requested it, but it is not really needed. --- pkgs/by-name/hy/hyprland/package.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/by-name/hy/hyprland/package.nix b/pkgs/by-name/hy/hyprland/package.nix index 6fb149c7fb6f..8810cc91cff4 100644 --- a/pkgs/by-name/hy/hyprland/package.nix +++ b/pkgs/by-name/hy/hyprland/package.nix @@ -12,7 +12,6 @@ binutils, cairo, epoll-shim, - git, glaze, hyprcursor, hyprgraphics, @@ -152,7 +151,6 @@ customStdenv.mkDerivation (finalAttrs: { aquamarine cairo glaze - git hyprcursor.dev hyprgraphics hyprlang From 9712420a2cf4d93f835f75ab9a8b45e57717437d Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Wed, 14 Jan 2026 16:27:01 +0200 Subject: [PATCH 2/3] hyprland: use substituteInPlace in postPatch Allows us to be notified in case the `sed` expressions become irrelevant. --- pkgs/by-name/hy/hyprland/package.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/hy/hyprland/package.nix b/pkgs/by-name/hy/hyprland/package.nix index 8810cc91cff4..d21d7f572c96 100644 --- a/pkgs/by-name/hy/hyprland/package.nix +++ b/pkgs/by-name/hy/hyprland/package.nix @@ -103,11 +103,14 @@ customStdenv.mkDerivation (finalAttrs: { postPatch = '' # Fix hardcoded paths to /usr installation - sed -i "s#/usr#$out#" src/render/OpenGL.cpp + substituteInPlace src/render/OpenGL.cpp \ + --replace-fail /usr $out # Remove extra @PREFIX@ to fix pkg-config paths - sed -i "s#@PREFIX@/##g" hyprland.pc.in - sed -i "s#@PREFIX@/##g" example/hyprland.desktop.in + substituteInPlace hyprland.pc.in \ + --replace-fail @PREFIX@ "" + substituteInPlace example/hyprland.desktop.in \ + --replace-fail @PREFIX@ "" ''; # variables used by CMake, and shown in `hyprctl version` From f664ba1b33406c841c3ac97aa15282ed3905b0f4 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Wed, 14 Jan 2026 16:57:11 +0200 Subject: [PATCH 3/3] hyprland: set GIT_COMMITS to an actual number (and not a hash) --- pkgs/by-name/hy/hyprland/package.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/hy/hyprland/package.nix b/pkgs/by-name/hy/hyprland/package.nix index d21d7f572c96..215cc6a4560b 100644 --- a/pkgs/by-name/hy/hyprland/package.nix +++ b/pkgs/by-name/hy/hyprland/package.nix @@ -116,7 +116,9 @@ customStdenv.mkDerivation (finalAttrs: { # variables used by CMake, and shown in `hyprctl version` env = { GIT_BRANCH = info.branch; - GIT_COMMITS = info.commit_hash; + # The amount of commits altogether. Not really worth getting that info from + # GitHub's API, so we set a dummy value. + GIT_COMMITS = "-1"; GIT_COMMIT_DATE = info.date; GIT_DIRTY = "clean"; GIT_COMMIT_HASH = info.commit_hash;