From ecde48723a5d91a0f98ea4816f115345edf94441 Mon Sep 17 00:00:00 2001 From: surfaceflinger Date: Mon, 23 Jan 2023 18:11:53 +0100 Subject: [PATCH 1/2] maintainers: add surfaceflinger --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 2b7272fe496..269ccc47996 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -14716,6 +14716,12 @@ githubId = 187109; name = "Bjarki Ágúst Guðmundsson"; }; + surfaceflinger = { + email = "nat@nekopon.pl"; + github = "surfaceflinger"; + githubId = 44725111; + name = "nat"; + }; suryasr007 = { email = "94suryateja@gmail.com"; github = "suryasr007"; From 8b0eecfb96c5cf1323dd1ffc61f9801d20e7cf88 Mon Sep 17 00:00:00 2001 From: surfaceflinger Date: Thu, 23 Feb 2023 13:09:53 +0100 Subject: [PATCH 2/2] jazz2: init at 1.8.0 --- pkgs/games/jazz2/content.nix | 20 ++++++++++++++ pkgs/games/jazz2/game.nix | 47 ++++++++++++++++++++++++++++++++ pkgs/games/jazz2/nocontent.patch | 12 ++++++++ pkgs/top-level/all-packages.nix | 4 +++ 4 files changed, 83 insertions(+) create mode 100644 pkgs/games/jazz2/content.nix create mode 100644 pkgs/games/jazz2/game.nix create mode 100644 pkgs/games/jazz2/nocontent.patch diff --git a/pkgs/games/jazz2/content.nix b/pkgs/games/jazz2/content.nix new file mode 100644 index 00000000000..0a0e7207563 --- /dev/null +++ b/pkgs/games/jazz2/content.nix @@ -0,0 +1,20 @@ +{ jazz2 +, lib +, runCommand +}: + +runCommand "jazz2-content" +{ + inherit (jazz2) version src; + + preferLocalBuild = true; + + meta = with lib; { + description = "Assets needed for jazz2"; + homepage = "https://github.com/deathkiller/jazz2-native"; + license = licenses.gpl3; + maintainers = with maintainers; [ surfaceflinger ]; + }; +} '' + cp -r $src/Content $out +'' diff --git a/pkgs/games/jazz2/game.nix b/pkgs/games/jazz2/game.nix new file mode 100644 index 00000000000..fab888b6178 --- /dev/null +++ b/pkgs/games/jazz2/game.nix @@ -0,0 +1,47 @@ +{ cmake +, fetchFromGitHub +, glew +, glfw +, jazz2-content +, lib +, libGL +, libopenmpt +, libvorbis +, openal +, SDL2 +, stdenv +, xorg +, zlib +}: + +stdenv.mkDerivation rec { + pname = "jazz2"; + version = "1.8.0"; + + src = fetchFromGitHub { + owner = "deathkiller"; + repo = "jazz2-native"; + rev = version; + sha256 = "fi1waoLAcnZB0lX+8+wQFoBYOSvVXYK3JKiu81GGF4U="; + }; + + patches = [ ./nocontent.patch ]; + + buildInputs = [ libGL SDL2 zlib glew glfw openal libvorbis libopenmpt xorg.libSM xorg.libICE xorg.libXext ]; + nativeBuildInputs = [ cmake ]; + + cmakeFlags = [ + "-DNCINE_DOWNLOAD_DEPENDENCIES=OFF" + "-DGLFW_INCLUDE_DIR=${glfw}/include/GLFW" + "-DLIBOPENMPT_INCLUDE_DIR=${libopenmpt.dev}/include/libopenmpt" + "-DNCINE_OVERRIDE_CONTENT_PATH=${jazz2-content}" + ]; + + meta = with lib; { + description = "Open-source Jazz Jackrabbit 2 reimplementation"; + homepage = "https://github.com/deathkiller/jazz2-native"; + license = licenses.gpl3; + maintainers = with maintainers; [ surfaceflinger ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/games/jazz2/nocontent.patch b/pkgs/games/jazz2/nocontent.patch new file mode 100644 index 00000000000..28ced9426b4 --- /dev/null +++ b/pkgs/games/jazz2/nocontent.patch @@ -0,0 +1,12 @@ +diff --git a/cmake/ncine_installation.cmake b/cmake/ncine_installation.cmake +index 9ccb707..89c350f 100644 +--- a/cmake/ncine_installation.cmake ++++ b/cmake/ncine_installation.cmake +@@ -195,7 +195,6 @@ endif() + #endif() + + if(NOT EMSCRIPTEN) +- install(DIRECTORY "${NCINE_ROOT}/Content/" DESTINATION ${DATA_INSTALL_DESTINATION}) + else() + install(FILES "${CMAKE_BINARY_DIR}/${CPACK_EXECUTABLE_NAME}.html" DESTINATION ".") + install(FILES "${CMAKE_BINARY_DIR}/${CPACK_EXECUTABLE_NAME}.data" DESTINATION ".") diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 189bbc677e8..0497157a786 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35877,6 +35877,10 @@ with pkgs; fish-fillets-ng = callPackage ../games/fish-fillets-ng { }; + jazz2 = callPackage ../games/jazz2/game.nix { }; + + jazz2-content = callPackage ../games/jazz2/content.nix { }; + jumpy = callPackage ../games/jumpy { }; flightgear = libsForQt5.callPackage ../games/flightgear { };