wayland-bongocat: packaging fixes (#452723)

This commit is contained in:
Matthew Croughan
2025-10-16 21:49:05 +00:00
committed by GitHub
+23 -6
View File
@@ -1,7 +1,9 @@
{
lib,
stdenv,
bash,
fetchFromGitHub,
gitUpdater,
pkg-config,
wayland,
wayland-protocols,
@@ -25,17 +27,21 @@ stdenv.mkDerivation (finalAttrs: {
wayland-scanner
];
buildInputs = [
bash
wayland
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"
];
postPatch = ''
substituteInPlace Makefile \
--replace-fail 'CC = gcc' 'CC ?= gcc'
'';
makeFlags = [ "release" ];
installPhase = ''
runHook preInstall
@@ -49,7 +55,18 @@ stdenv.mkDerivation (finalAttrs: {
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
# Package information
installCheckPhase = ''
runHook preInstallCheck
$out/bin/bongocat-find-devices --help
runHook postInstallCheck
'';
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";