summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-10-28 18:00:57 +0000
committerGitHub <noreply@github.com>2023-10-28 18:00:57 +0000
commit52b6b902433085b135c30c8024e0c5c28ed757c5 (patch)
treefe9c934e2ad002d1035b968722a12405cbb55e8d /pkgs/games
parent223afab31f02a156627ce5918a083e0a8ef3b8be (diff)
parentd59ba91d5a8687a8872ce4941ef23533fc2aa009 (diff)
downloadnixpkgs-52b6b902433085b135c30c8024e0c5c28ed757c5.tar
nixpkgs-52b6b902433085b135c30c8024e0c5c28ed757c5.tar.gz
nixpkgs-52b6b902433085b135c30c8024e0c5c28ed757c5.tar.bz2
nixpkgs-52b6b902433085b135c30c8024e0c5c28ed757c5.tar.lz
nixpkgs-52b6b902433085b135c30c8024e0c5c28ed757c5.tar.xz
nixpkgs-52b6b902433085b135c30c8024e0c5c28ed757c5.tar.zst
nixpkgs-52b6b902433085b135c30c8024e0c5c28ed757c5.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/brogue-ce/default.nix63
-rw-r--r--pkgs/games/endgame-singularity/default.nix1
2 files changed, 64 insertions, 0 deletions
diff --git a/pkgs/games/brogue-ce/default.nix b/pkgs/games/brogue-ce/default.nix
new file mode 100644
index 00000000000..0691d82f175
--- /dev/null
+++ b/pkgs/games/brogue-ce/default.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, makeDesktopItem
+, copyDesktopItems
+, SDL2
+, SDL2_image
+}:
+
+stdenv.mkDerivation rec {
+  pname = "brogue-ce";
+  version = "1.12";
+
+  src = fetchFromGitHub {
+    owner = "tmewett";
+    repo = "BrogueCE";
+    rev = "v${version}";
+    hash = "sha256-bGAE0hRiKBo3ikyObGxAiPRRO24KtC+upO3XLj+f4yo=";
+  };
+
+  postPatch = ''
+    substituteInPlace linux/brogue-multiuser.sh \
+      --replace broguedir= "broguedir=$out/opt/brogue-ce #"
+  '';
+
+  nativeBuildInputs = [
+    copyDesktopItems
+  ];
+
+  buildInputs = [
+    SDL2
+    SDL2_image
+  ];
+
+  makeFlags = [ "DATADIR=$(out)/opt/brogue-ce" ];
+
+  desktopItems = [(makeDesktopItem {
+    name = "brogue-ce";
+    desktopName = "Brogue CE";
+    genericName = "Roguelike";
+    comment = "Brave the Dungeons of Doom!";
+    icon = "brogue-ce";
+    exec = "brogue-ce";
+    categories = [ "Game" "AdventureGame" ];
+  })];
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/opt
+    cp -r bin $out/opt/brogue-ce
+    install -Dm755 linux/brogue-multiuser.sh $out/bin/brogue-ce
+    install -Dm 644 bin/assets/icon.png $out/share/icons/hicolor/256x256/apps/brogue-ce.png
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "A community-lead fork of the minimalist roguelike game Brogue";
+    homepage = "https://github.com/tmewett/BrogueCE";
+    license = licenses.agpl3;
+    maintainers = with maintainers; [ fgaz ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/games/endgame-singularity/default.nix b/pkgs/games/endgame-singularity/default.nix
index ceb3d74816a..57766c2e844 100644
--- a/pkgs/games/endgame-singularity/default.nix
+++ b/pkgs/games/endgame-singularity/default.nix
@@ -54,6 +54,7 @@ python3.pkgs.buildPythonApplication rec {
       free # earth images from NASA, some fonts
       cc0 # cick0.wav
     ];
+    mainProgram = "singularity";
     maintainers = with lib.maintainers; [ fgaz ];
   };
 }