diff options
author | Francesco Gazzetta <fgaz@fgaz.me> | 2023-08-17 16:00:42 +0200 |
---|---|---|
committer | Francesco Gazzetta <fgaz@fgaz.me> | 2023-10-28 14:33:26 +0000 |
commit | b9addb4b769c5b52622281eb941cdd251e84c53d (patch) | |
tree | 946c075162e45391583e742d342c4f2499c097a1 /pkgs/games | |
parent | 10a91eeeb1943de9aca1951fc8bef1a8be36a0d0 (diff) |
brogue-ce: init at 1.12
Diffstat (limited to 'pkgs/games')
-rw-r--r-- | pkgs/games/brogue-ce/default.nix | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/games/brogue-ce/default.nix b/pkgs/games/brogue-ce/default.nix new file mode 100644 index 0000000000000..0691d82f175a2 --- /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; + }; +} |