about summary refs log tree commit diff
path: root/pkgs/by-name/su
diff options
context:
space:
mode:
authorMasum Reza <50095635+JohnRTitor@users.noreply.github.com>2024-06-25 17:57:34 +0530
committerGitHub <noreply@github.com>2024-06-25 17:57:34 +0530
commit5da2516724651662cc5ce19ac183e054bf4a6a91 (patch)
treeb256c7bcc25531c2b4633e9e7cbfe7f5008cd734 /pkgs/by-name/su
parent859d745392df101b699a31c3e6942ffa54b9a87c (diff)
parent15582e9b5ff11be798ee0470d310a16ff661a797 (diff)
Merge pull request #321668 from theobori/master
supermariowar: init at 2.0-unstable-2024-06-22
Diffstat (limited to 'pkgs/by-name/su')
-rw-r--r--pkgs/by-name/su/supermariowar/package.nix68
1 files changed, 68 insertions, 0 deletions
diff --git a/pkgs/by-name/su/supermariowar/package.nix b/pkgs/by-name/su/supermariowar/package.nix
new file mode 100644
index 0000000000000..2da3cc58dc42c
--- /dev/null
+++ b/pkgs/by-name/su/supermariowar/package.nix
@@ -0,0 +1,68 @@
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  cmake,
+  pkg-config,
+  enet,
+  yaml-cpp,
+  SDL2,
+  SDL2_image,
+  SDL2_mixer,
+  zlib,
+  unstableGitUpdater,
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "supermariowar";
+  version = "2.0-unstable-2024-06-22";
+
+  src = fetchFromGitHub {
+    owner = "mmatyas";
+    repo = "supermariowar";
+    rev = "e646679c119a3b6c93c48e505564e8d24441fe4e";
+    hash = "sha256-bA/Pu47Rm1MrnJHIrRvOevI3LXj207GFcJloP94/LOA=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    enet
+    yaml-cpp
+    SDL2
+    SDL2_image
+    SDL2_mixer
+    zlib
+  ];
+
+  cmakeFlags = [ "-DBUILD_STATIC_LIBS=OFF" ];
+
+  postInstall = ''
+    mkdir -p $out/bin
+
+    for app in smw smw-leveledit smw-worldedit; do
+      chmod +x $out/games/$app
+
+      cat << EOF > $out/bin/$app
+      $out/games/$app --datadir $out/share/games/smw
+    EOF
+      chmod +x $out/bin/$app
+    done
+
+    ln -s $out/games/smw-server $out/bin/smw-server
+  '';
+  passthru.updateScript = unstableGitUpdater { };
+  meta = {
+    description = "A fan-made multiplayer Super Mario Bros. style deathmatch game";
+    homepage = "https://github.com/mmatyas/supermariowar";
+    changelog = "https://github.com/mmatyas/supermariowar/blob/${finalAttrs.src.rev}/CHANGELOG";
+    license = lib.licenses.gpl2Plus;
+    maintainers = with lib.maintainers; [ theobori ];
+    mainProgram = "smw";
+    platforms = lib.platforms.linux;
+  };
+})