2022-08-21 05:35:00 +02:00
|
|
|
{ lib, stdenv, fetchFromGitHub, SDL, SDL_ttf, SDL_gfx, SDL_mixer, libpng
|
|
|
|
, glew, dejavu_fonts, makeDesktopItem }:
|
2018-07-10 21:24:59 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "hyperrogue";
|
2024-02-27 05:34:04 +01:00
|
|
|
version = "13.0c";
|
2018-07-10 21:24:59 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zenorogue";
|
|
|
|
repo = "hyperrogue";
|
2020-04-02 18:33:58 +02:00
|
|
|
rev = "v${version}";
|
2024-02-27 05:34:04 +01:00
|
|
|
sha256 = "sha256-eELR/1GzR9wWJ433rIpueMu9omlsl1y5rmvG3GgSHZA=";
|
2018-07-10 21:24:59 +02:00
|
|
|
};
|
|
|
|
|
2022-08-21 05:35:00 +02:00
|
|
|
CXXFLAGS = [
|
|
|
|
"-I${lib.getDev SDL}/include/SDL"
|
|
|
|
"-DHYPERPATH='\"${placeholder "out"}/share/hyperrogue/\"'"
|
|
|
|
"-DRESOURCEDESTDIR=HYPERPATH"
|
|
|
|
"-DHYPERFONTPATH='\"${dejavu_fonts}/share/fonts/truetype/\"'"
|
|
|
|
];
|
|
|
|
HYPERROGUE_USE_GLEW = 1;
|
|
|
|
HYPERROGUE_USE_PNG = 1;
|
2018-07-10 21:24:59 +02:00
|
|
|
|
2022-08-21 05:35:00 +02:00
|
|
|
buildInputs = [ SDL SDL_ttf SDL_gfx SDL_mixer libpng glew ];
|
2018-07-10 21:24:59 +02:00
|
|
|
|
2019-04-21 05:41:29 +02:00
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "hyperrogue";
|
|
|
|
desktopName = "HyperRogue";
|
|
|
|
genericName = "HyperRogue";
|
|
|
|
comment = meta.description;
|
|
|
|
icon = "hyperrogue";
|
|
|
|
exec = "hyperrogue";
|
2022-02-22 15:56:15 +01:00
|
|
|
categories = [ "Game" "AdventureGame" ];
|
2019-04-21 05:41:29 +02:00
|
|
|
};
|
|
|
|
|
2022-08-21 05:35:00 +02:00
|
|
|
installPhase = ''
|
|
|
|
install -d $out/share/hyperrogue/{sounds,music}
|
|
|
|
|
|
|
|
install -m 555 -D hyperrogue $out/bin/hyperrogue
|
|
|
|
install -m 444 -D hyperrogue-music.txt *.dat $out/share/hyperrogue
|
|
|
|
install -m 444 -D music/* $out/share/hyperrogue/music
|
|
|
|
install -m 444 -D sounds/* $out/share/hyperrogue/sounds
|
|
|
|
|
2019-04-21 05:41:29 +02:00
|
|
|
install -m 444 -D ${desktopItem}/share/applications/hyperrogue.desktop \
|
|
|
|
$out/share/applications/hyperrogue.desktop
|
|
|
|
install -m 444 -D hyperroid/app/src/main/res/drawable-ldpi/icon.png \
|
|
|
|
$out/share/icons/hicolor/36x36/apps/hyperrogue.png
|
|
|
|
install -m 444 -D hyperroid/app/src/main/res/drawable-mdpi/icon.png \
|
|
|
|
$out/share/icons/hicolor/48x48/apps/hyperrogue.png
|
|
|
|
install -m 444 -D hyperroid/app/src/main/res/drawable-hdpi/icon.png \
|
|
|
|
$out/share/icons/hicolor/72x72/apps/hyperrogue.png
|
|
|
|
install -m 444 -D hyperroid/app/src/main/res/drawable-xhdpi/icon.png \
|
|
|
|
$out/share/icons/hicolor/96x96/apps/hyperrogue.png
|
|
|
|
install -m 444 -D hyperroid/app/src/main/res/drawable-xxhdpi/icon.png \
|
|
|
|
$out/share/icons/hicolor/144x144/apps/hyperrogue.png
|
|
|
|
install -m 444 -D hyperroid/app/src/main/res/drawable-xxxhdpi/icon.png \
|
|
|
|
$out/share/icons/hicolor/192x192/apps/hyperrogue.png
|
|
|
|
'';
|
|
|
|
|
2018-11-27 21:21:25 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2023-10-30 21:41:44 +01:00
|
|
|
homepage = "https://www.roguetemple.com/z/hyper/";
|
2018-07-10 21:24:59 +02:00
|
|
|
description = "A roguelike game set in hyperbolic geometry";
|
2024-03-19 03:14:51 +01:00
|
|
|
mainProgram = "hyperrogue";
|
2018-07-10 21:24:59 +02:00
|
|
|
maintainers = with maintainers; [ rardiol ];
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|