at 23.05-pre 69 lines 2.5 kB view raw
1{ lib, stdenv, fetchFromGitHub, SDL, SDL_ttf, SDL_gfx, SDL_mixer, libpng 2, glew, dejavu_fonts, makeDesktopItem }: 3 4stdenv.mkDerivation rec { 5 pname = "hyperrogue"; 6 version = "12.1a"; 7 8 src = fetchFromGitHub { 9 owner = "zenorogue"; 10 repo = "hyperrogue"; 11 rev = "v${version}"; 12 sha256 = "sha256-VmWZkIjDy/yv0g9YCW9x8b0LE5guHIA/KZc3OXJoCdA="; 13 }; 14 15 CXXFLAGS = [ 16 "-I${lib.getDev SDL}/include/SDL" 17 "-DHYPERPATH='\"${placeholder "out"}/share/hyperrogue/\"'" 18 "-DRESOURCEDESTDIR=HYPERPATH" 19 "-DHYPERFONTPATH='\"${dejavu_fonts}/share/fonts/truetype/\"'" 20 ]; 21 HYPERROGUE_USE_GLEW = 1; 22 HYPERROGUE_USE_PNG = 1; 23 24 buildInputs = [ SDL SDL_ttf SDL_gfx SDL_mixer libpng glew ]; 25 26 desktopItem = makeDesktopItem { 27 name = "hyperrogue"; 28 desktopName = "HyperRogue"; 29 genericName = "HyperRogue"; 30 comment = meta.description; 31 icon = "hyperrogue"; 32 exec = "hyperrogue"; 33 categories = [ "Game" "AdventureGame" ]; 34 }; 35 36 installPhase = '' 37 install -d $out/share/hyperrogue/{sounds,music} 38 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 43 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 58 ''; 59 60 enableParallelBuilding = true; 61 62 meta = with lib; { 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; 68 }; 69}