animatch: simplify build

This commit is contained in:
2023-11-16 07:39:28 +00:00
parent 1b3f902dc2
commit c46a5089a6

View File

@@ -4,10 +4,16 @@
, fetchFromGitLab , fetchFromGitLab
, libGL , libGL
, libwebp , libwebp
, SDL2
, xorg , 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"; pname = "animatch";
version = "1.0.3"; version = "1.0.3";
src = fetchFromGitLab { src = fetchFromGitLab {
@@ -20,23 +26,16 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake
] ++ allegro5.nativeBuildInputs; ];
buildInputs = [ buildInputs = [
# allegro5 allegro'
libGL libGL
xorg.libX11 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 = [ cmakeFlags = [
"-DLIBSUPERDERPY_STATIC=ON" # recommended by upstream for coexistence with other superderpy games "-DLIBSUPERDERPY_STATIC=ON" # recommended by upstream for coexistence with other superderpy games
"-DLIBSUPERDERPY_EMBEDDED_ALLEGRO=ON"
"-DALLEGRO_SDL=ON"
]; ];
# debugging: # debugging: