diff --git a/pkgs/by-name/wa/wayland-bongocat/package.nix b/pkgs/by-name/wa/wayland-bongocat/package.nix index 5574421c87ad..41e0a94d8175 100644 --- a/pkgs/by-name/wa/wayland-bongocat/package.nix +++ b/pkgs/by-name/wa/wayland-bongocat/package.nix @@ -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";