From 71f2c4d01986adf1782fb08800bde551b107dd33 Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 16 Oct 2025 20:24:54 +0000 Subject: [PATCH 1/5] wayland-bongocat: lift make flags out of `preBuild` into `makeFlags` --- pkgs/by-name/wa/wayland-bongocat/package.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/wa/wayland-bongocat/package.nix b/pkgs/by-name/wa/wayland-bongocat/package.nix index 5574421c87ad..a6135aab6dd2 100644 --- a/pkgs/by-name/wa/wayland-bongocat/package.nix +++ b/pkgs/by-name/wa/wayland-bongocat/package.nix @@ -29,13 +29,11 @@ stdenv.mkDerivation (finalAttrs: { wayland-protocols ]; - # Build phases - # Ensure that the Makefile has the correct directory with the Wayland protocols - preBuild = '' - export WAYLAND_PROTOCOLS_DIR="${wayland-protocols}/share/wayland-protocols" - ''; + makeFlags = [ + "WAYLAND_PROTOCOLS_DIR=${wayland-protocols}/share/wayland-protocols" + "release" + ]; - makeFlags = [ "release" ]; installPhase = '' runHook preInstall From ae8a7fd9a24092d722a161a83b039b6c25ec67c5 Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 16 Oct 2025 20:27:13 +0000 Subject: [PATCH 2/5] wayland-bongocat: use stdenv CC instead of forcing `CC = gcc` notably, this fixes cross compilation (in which `CC` is flavored, like `aarch64-linux-gnu-gcc`). --- pkgs/by-name/wa/wayland-bongocat/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/by-name/wa/wayland-bongocat/package.nix b/pkgs/by-name/wa/wayland-bongocat/package.nix index a6135aab6dd2..da5455bd2fed 100644 --- a/pkgs/by-name/wa/wayland-bongocat/package.nix +++ b/pkgs/by-name/wa/wayland-bongocat/package.nix @@ -34,6 +34,11 @@ stdenv.mkDerivation (finalAttrs: { "release" ]; + postPatch = '' + substituteInPlace Makefile \ + --replace-fail 'CC = gcc' 'CC ?= gcc' + ''; + installPhase = '' runHook preInstall From 8fd7ee2e556846f2f47fdfe0c389d55214c8d0dc Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 16 Oct 2025 20:33:53 +0000 Subject: [PATCH 3/5] wayland-bongocat: fix missing `bash` input without this, `bongocat-find-devices` errors: > /usr/bin/bash: bad interpreter --- pkgs/by-name/wa/wayland-bongocat/package.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/by-name/wa/wayland-bongocat/package.nix b/pkgs/by-name/wa/wayland-bongocat/package.nix index da5455bd2fed..6d2c06b1e21d 100644 --- a/pkgs/by-name/wa/wayland-bongocat/package.nix +++ b/pkgs/by-name/wa/wayland-bongocat/package.nix @@ -1,6 +1,7 @@ { lib, stdenv, + bash, fetchFromGitHub, pkg-config, wayland, @@ -25,6 +26,7 @@ stdenv.mkDerivation (finalAttrs: { wayland-scanner ]; buildInputs = [ + bash wayland wayland-protocols ]; From 5b3aada8037f911a3d6fc225bc25dcbe5b211be0 Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 16 Oct 2025 20:34:50 +0000 Subject: [PATCH 4/5] wayland-bongocat: invoke `bongocat-find-devices` in `installCheckPhase` this protects against e.g. `bash` being accidentally removed from `buildInputs` in the future. --- pkgs/by-name/wa/wayland-bongocat/package.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/by-name/wa/wayland-bongocat/package.nix b/pkgs/by-name/wa/wayland-bongocat/package.nix index 6d2c06b1e21d..0626341a23d4 100644 --- a/pkgs/by-name/wa/wayland-bongocat/package.nix +++ b/pkgs/by-name/wa/wayland-bongocat/package.nix @@ -54,6 +54,14 @@ stdenv.mkDerivation (finalAttrs: { doInstallCheck = true; nativeInstallCheckInputs = [ versionCheckHook ]; + installCheckPhase = '' + runHook preInstallCheck + + $out/bin/bongocat-find-devices --help + + runHook postInstallCheck + ''; + # Package information meta = { description = "Delightful Wayland overlay that displays an animated bongo cat reacting to keyboard input"; From 67ba706def1a9c4fd35b35de472fa7225757d14a Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 16 Oct 2025 20:36:54 +0000 Subject: [PATCH 5/5] wayland-bongocat: define `passthru.updateScript` --- pkgs/by-name/wa/wayland-bongocat/package.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/wa/wayland-bongocat/package.nix b/pkgs/by-name/wa/wayland-bongocat/package.nix index 0626341a23d4..41e0a94d8175 100644 --- a/pkgs/by-name/wa/wayland-bongocat/package.nix +++ b/pkgs/by-name/wa/wayland-bongocat/package.nix @@ -3,6 +3,7 @@ stdenv, bash, fetchFromGitHub, + gitUpdater, pkg-config, wayland, wayland-protocols, @@ -62,7 +63,10 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstallCheck ''; - # Package information + passthru.updateScript = gitUpdater { + rev-prefix = "v"; + }; + meta = { description = "Delightful Wayland overlay that displays an animated bongo cat reacting to keyboard input"; homepage = "https://github.com/saatvik333/wayland-bongocat";