From c46a5089a6d96be8bc0b1d7604629ca03aa2ea57 Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 16 Nov 2023 07:39:28 +0000 Subject: [PATCH] animatch: simplify build --- pkgs/additional/animatch/default.nix | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/pkgs/additional/animatch/default.nix b/pkgs/additional/animatch/default.nix index 9b067f1eb..d678a6d84 100644 --- a/pkgs/additional/animatch/default.nix +++ b/pkgs/additional/animatch/default.nix @@ -4,10 +4,16 @@ , fetchFromGitLab , libGL , libwebp -, SDL2 , xorg }: -stdenv.mkDerivation rec { +let + allegro' = allegro5.overrideAttrs (base: { + # TODO: patch upstream nixpkgs' allegro5 to have this enabled + buildInputs = base.buildInputs ++ [ + libwebp + ]; + }); +in stdenv.mkDerivation rec { pname = "animatch"; version = "1.0.3"; src = fetchFromGitLab { @@ -20,23 +26,16 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake - ] ++ allegro5.nativeBuildInputs; + ]; buildInputs = [ - # allegro5 + allegro' libGL xorg.libX11 - - # needed when building allegro. - # maybe if i add these missing deps to the nixpkgs allegro5 package i can link directly - SDL2 - libwebp - ] ++ allegro5.buildInputs; + ]; cmakeFlags = [ "-DLIBSUPERDERPY_STATIC=ON" # recommended by upstream for coexistence with other superderpy games - "-DLIBSUPERDERPY_EMBEDDED_ALLEGRO=ON" - "-DALLEGRO_SDL=ON" ]; # debugging: