diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 4cbe626b108e..a438077c23d9 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -19212,6 +19212,13 @@ githubId = 20760527; name = "Madelyn"; }; + r4v3n6101 = { + name = "r4v3n6101"; + email = "raven6107@gmail.com"; + github = "r4v3n6101"; + githubId = 30029970; + keys = [ { fingerprint = "FA05 8A29 B45E 06C0 8FE9 4907 05D2 BE42 F3EC D7CC"; } ]; + }; raboof = { email = "arnout@bzzt.net"; matrix = "@raboof:matrix.org"; diff --git a/pkgs/by-name/gz/gzdoom/package.nix b/pkgs/by-name/gz/gzdoom/package.nix index 17051d7692e6..0a71bda14202 100644 --- a/pkgs/by-name/gz/gzdoom/package.nix +++ b/pkgs/by-name/gz/gzdoom/package.nix @@ -8,16 +8,13 @@ SDL2, bzip2, cmake, - fluidsynth, game-music-emu, gtk3, imagemagick, libGL, libjpeg, - libsndfile, libvpx, libwebp, - mpg123, ninja, openal, pkg-config, @@ -40,35 +37,32 @@ stdenv.mkDerivation rec { patches = [ ./string_format.patch ]; - outputs = [ - "out" - "doc" - ]; + outputs = [ "out" ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "doc" ]; nativeBuildInputs = [ cmake - copyDesktopItems imagemagick makeWrapper ninja pkg-config - ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ copyDesktopItems ]; buildInputs = [ SDL2 + zlib bzip2 - fluidsynth - game-music-emu gtk3 + + # Graphics libGL libjpeg - libsndfile libvpx libwebp - mpg123 - openal vulkan-loader - zlib + + # Sound (ZMusic contain MIDI libs) + game-music-emu + openal zmusic ]; @@ -80,12 +74,14 @@ stdenv.mkDerivation rec { --replace-fail "" "${src.rev}" ''; + # Apple dropped GL support + # Shader's loading will throw an error while linking cmakeFlags = [ "-DDYN_GTK=OFF" "-DDYN_OPENAL=OFF" - ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DHAVE_GLES2=OFF" ]; - desktopItems = [ + desktopItems = lib.optionals stdenv.hostPlatform.isLinux [ (makeDesktopItem { name = "gzdoom"; exec = "gzdoom"; @@ -96,7 +92,12 @@ stdenv.mkDerivation rec { }) ]; - postInstall = '' + installPhase = lib.optionalString stdenv.hostPlatform.isDarwin '' + mkdir -p "$out/Applications" + mv gzdoom.app "$out/Applications/" + ''; + + postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' mv $out/bin/gzdoom $out/share/games/doom/gzdoom makeWrapper $out/share/games/doom/gzdoom $out/bin/gzdoom \ --set LD_LIBRARY_PATH ${lib.makeLibraryPath [ vulkan-loader ]} @@ -117,11 +118,12 @@ stdenv.mkDerivation rec { ZDoom, adding an OpenGL renderer and powerful scripting capabilities. ''; license = lib.licenses.gpl3Plus; - platforms = lib.platforms.linux; + platforms = with lib.platforms; linux ++ darwin; maintainers = with lib.maintainers; [ azahi lassulus Gliczy + r4v3n6101 ]; }; } diff --git a/pkgs/by-name/zm/zmusic/package.nix b/pkgs/by-name/zm/zmusic/package.nix index 6c7c04f4a648..e68cb3db7368 100644 --- a/pkgs/by-name/zm/zmusic/package.nix +++ b/pkgs/by-name/zm/zmusic/package.nix @@ -29,9 +29,7 @@ stdenv.mkDerivation rec { "dev" ]; - patches = [ - ./fluidsynth.patch - ]; + patches = [ ./fluidsynth.patch ]; postPatch = '' substituteInPlace source/mididevices/music_fluidsynth_mididevice.cpp \ @@ -46,12 +44,11 @@ stdenv.mkDerivation rec { ]; buildInputs = [ - alsa-lib fluidsynth libsndfile mpg123 zlib - ]; + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib ]; meta = { description = "GZDoom's music system as a standalone library"; @@ -67,6 +64,7 @@ stdenv.mkDerivation rec { azahi lassulus Gliczy + r4v3n6101 ]; }; }