Merge pull request #307825 from surfaceflinger/jazz2-wayland-fix

jazz2: drop graphicsLibrary, switch to SDL2 by default
This commit is contained in:
Peder Bergebakken Sundt 2024-05-01 00:23:12 +02:00 committed by GitHub
commit a92b3a32a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,5 @@
{ cmake
, fetchFromGitHub
, glfw
, jazz2-content
, lib
, libopenmpt
@ -10,10 +9,8 @@
, stdenv
, testers
, zlib
, graphicsLibrary ? "GLFW"
}:
assert lib.assertOneOf "graphicsLibrary" graphicsLibrary [ "SDL2" "GLFW" ];
stdenv.mkDerivation (finalAttrs: {
pname = "jazz2";
version = "2.6.0";
@ -28,16 +25,12 @@ stdenv.mkDerivation (finalAttrs: {
patches = [ ./nocontent.patch ];
nativeBuildInputs = [ cmake ];
buildInputs = [ libopenmpt libvorbis openal zlib ]
++ lib.optionals (graphicsLibrary == "GLFW") [ glfw ]
++ lib.optionals (graphicsLibrary == "SDL2") [ SDL2 ];
buildInputs = [ libopenmpt libvorbis openal SDL2 zlib ];
cmakeFlags = [
"-DLIBOPENMPT_INCLUDE_DIR=${lib.getDev libopenmpt}/include/libopenmpt"
"-DNCINE_DOWNLOAD_DEPENDENCIES=OFF"
"-DNCINE_OVERRIDE_CONTENT_PATH=${jazz2-content}"
] ++ lib.optionals (graphicsLibrary == "GLFW") [
"-DGLFW_INCLUDE_DIR=${glfw}/include/GLFW"
];
passthru.tests.version = testers.testVersion {