From f2fb4944f63bef0354a88e3e94c8e847bddd03f0 Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 16 Nov 2023 19:48:06 +0000 Subject: [PATCH 1/3] allegro5: order dependencies one-per-line this is only a formatting change. in response to: --- pkgs/development/libraries/allegro/5.nix | 85 ++++++++++++++++++++---- 1 file changed, 72 insertions(+), 13 deletions(-) diff --git a/pkgs/development/libraries/allegro/5.nix b/pkgs/development/libraries/allegro/5.nix index b3346be1bb70..125402009cf0 100644 --- a/pkgs/development/libraries/allegro/5.nix +++ b/pkgs/development/libraries/allegro/5.nix @@ -1,10 +1,40 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch, texinfo, libXext, xorgproto, libX11 -, libXpm, libXt, libXcursor, alsa-lib, cmake, zlib, libpng, libvorbis -, libXxf86dga, libXxf86misc -, libXxf86vm, openal, libGLU, libGL, libjpeg, flac -, libXi, libXfixes, freetype, libopus, libtheora -, physfs, enet, pkg-config, gtk3, pcre, libpulseaudio, libpthreadstubs +{ lib +, alsa-lib +, cmake +, enet +, fetchFromGitHub +, fetchpatch +, flac +, freetype +, gtk3 +, libGL +, libGLU +, libjpeg +, libopus +, libpng +, libpthreadstubs +, libpulseaudio +, libtheora +, libvorbis +, libX11 +, libXcursor , libXdmcp +, libXext +, libXfixes +, libXi +, libXpm +, libXt +, libXxf86dga +, libXxf86misc +, libXxf86vm +, openal +, pcre +, physfs +, pkg-config +, stdenv +, texinfo +, xorgproto +, zlib }: stdenv.mkDerivation rec { @@ -18,15 +48,44 @@ stdenv.mkDerivation rec { sha256 = "sha256-uNcaeTelFNfg+YjPYc7nK4TrFDxJsEuPhsF8x1cvIYQ="; }; - nativeBuildInputs = [ cmake pkg-config ]; + nativeBuildInputs = [ + cmake + pkg-config + ]; + buildInputs = [ - texinfo zlib libpng libvorbis openal libGLU libGL - libjpeg flac enet libtheora freetype physfs libopus - gtk3 pcre + enet + flac + freetype + gtk3 + libGL + libGLU + libjpeg + libopus + libpng + libtheora + libvorbis + openal + pcre + physfs + texinfo + zlib ] ++ lib.optionals stdenv.isLinux [ - libXext xorgproto libX11 libXpm libXt libXcursor alsa-lib - libXxf86dga libXxf86misc libXxf86vm libXi libXfixes - libXdmcp libpulseaudio libpthreadstubs + alsa-lib + libpthreadstubs + libpulseaudio + libX11 + libXcursor + libXdmcp + libXext + libXfixes + libXi + libXpm + libXt + libXxf86dga + libXxf86misc + libXxf86vm + xorgproto ]; postPatch = '' From 1c8090feb886d6aae5d1d519529b83deb1ce8844 Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 16 Nov 2023 19:52:55 +0000 Subject: [PATCH 2/3] allegro5: enable webp support allegro conditionall supports for image formats based on what's available at compile time. building allegro with `libwebp` allows users of the the library to load webp image assets at runtime. --- pkgs/development/libraries/allegro/5.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/allegro/5.nix b/pkgs/development/libraries/allegro/5.nix index 125402009cf0..487b0dfde0d6 100644 --- a/pkgs/development/libraries/allegro/5.nix +++ b/pkgs/development/libraries/allegro/5.nix @@ -16,6 +16,7 @@ , libpulseaudio , libtheora , libvorbis +, libwebp , libX11 , libXcursor , libXdmcp @@ -65,6 +66,7 @@ stdenv.mkDerivation rec { libpng libtheora libvorbis + libwebp openal pcre physfs From 1284b391774aa1406109f192b48dada8252e90b6 Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 16 Nov 2023 19:58:33 +0000 Subject: [PATCH 3/3] animatch: init at 1.0.3 --- pkgs/games/animatch/default.nix | 41 +++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 43 insertions(+) create mode 100644 pkgs/games/animatch/default.nix diff --git a/pkgs/games/animatch/default.nix b/pkgs/games/animatch/default.nix new file mode 100644 index 000000000000..b6bf5473807c --- /dev/null +++ b/pkgs/games/animatch/default.nix @@ -0,0 +1,41 @@ +{ lib +, allegro5 +, cmake +, fetchFromGitLab +, libGL +, stdenv +, xorg +}: +stdenv.mkDerivation rec { + pname = "animatch"; + version = "1.0.3"; + src = fetchFromGitLab { + owner = "HolyPangolin"; + repo = "animatch"; + fetchSubmodules = true; + rev = "v${version}"; + hash = "sha256-zBV45WMAXtCpPPbDpr04K/a9UtZ4KLP9nUauBlbhrFo="; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + allegro5 + libGL + xorg.libX11 + ]; + + cmakeFlags = [ + "-DLIBSUPERDERPY_STATIC=ON" # recommended by upstream for coexistence with other superderpy games + ]; + + meta = { + homepage = "https://gitlab.com/HolyPangolin/animatch/"; + description = "A cute match three game for the Librem 5 smartphone"; + license = with lib.licenses; [ gpl3Plus ]; + maintainers = with lib.maintainers; [ colinsane ]; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ed3b9a8c0e10..3a17dbd08adc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -37535,6 +37535,8 @@ with pkgs; angband = callPackage ../games/angband { }; + animatch = callPackage ../games/animatch { }; + anki = callPackage ../games/anki { inherit (darwin.apple_sdk.frameworks) AVKit CoreAudio; };