1 { lib, stdenv, fetchFromGitHub, SDL, SDL_ttf, SDL_gfx, SDL_mixer, libpng
2 , glew, dejavu_fonts, makeDesktopItem }:
4 stdenv.mkDerivation rec {
8 src = fetchFromGitHub {
12 sha256 = "sha256-VmWZkIjDy/yv0g9YCW9x8b0LE5guHIA/KZc3OXJoCdA=";
16 "-I${lib.getDev SDL}/include/SDL"
17 "-DHYPERPATH='\"${placeholder "out"}/share/hyperrogue/\"'"
18 "-DRESOURCEDESTDIR=HYPERPATH"
19 "-DHYPERFONTPATH='\"${dejavu_fonts}/share/fonts/truetype/\"'"
21 HYPERROGUE_USE_GLEW = 1;
22 HYPERROGUE_USE_PNG = 1;
24 buildInputs = [ SDL SDL_ttf SDL_gfx SDL_mixer libpng glew ];
26 desktopItem = makeDesktopItem {
28 desktopName = "HyperRogue";
29 genericName = "HyperRogue";
30 comment = meta.description;
33 categories = [ "Game" "AdventureGame" ];
37 install -d $out/share/hyperrogue/{sounds,music}
39 install -m 555 -D hyperrogue $out/bin/hyperrogue
40 install -m 444 -D hyperrogue-music.txt *.dat $out/share/hyperrogue
41 install -m 444 -D music/* $out/share/hyperrogue/music
42 install -m 444 -D sounds/* $out/share/hyperrogue/sounds
44 install -m 444 -D ${desktopItem}/share/applications/hyperrogue.desktop \
45 $out/share/applications/hyperrogue.desktop
46 install -m 444 -D hyperroid/app/src/main/res/drawable-ldpi/icon.png \
47 $out/share/icons/hicolor/36x36/apps/hyperrogue.png
48 install -m 444 -D hyperroid/app/src/main/res/drawable-mdpi/icon.png \
49 $out/share/icons/hicolor/48x48/apps/hyperrogue.png
50 install -m 444 -D hyperroid/app/src/main/res/drawable-hdpi/icon.png \
51 $out/share/icons/hicolor/72x72/apps/hyperrogue.png
52 install -m 444 -D hyperroid/app/src/main/res/drawable-xhdpi/icon.png \
53 $out/share/icons/hicolor/96x96/apps/hyperrogue.png
54 install -m 444 -D hyperroid/app/src/main/res/drawable-xxhdpi/icon.png \
55 $out/share/icons/hicolor/144x144/apps/hyperrogue.png
56 install -m 444 -D hyperroid/app/src/main/res/drawable-xxxhdpi/icon.png \
57 $out/share/icons/hicolor/192x192/apps/hyperrogue.png
60 enableParallelBuilding = true;
63 homepage = "http://www.roguetemple.com/z/hyper/";
64 description = "A roguelike game set in hyperbolic geometry";
65 maintainers = with maintainers; [ rardiol ];
66 license = licenses.gpl2;
67 platforms = platforms.all;