lol
at 18.09-beta 56 lines 1.9 kB view raw
1{ stdenv, lib, fetchFromGitHub, which, sqlite, lua5_1, perl, zlib, pkgconfig, ncurses 2, dejavu_fonts, libpng, SDL2, SDL2_image, libGLU_combined, freetype, pngcrush, advancecomp 3, tileMode ? false 4}: 5 6stdenv.mkDerivation rec { 7 name = "crawl-${version}${lib.optionalString tileMode "-tiles"}"; 8 version = "0.22.0"; 9 10 src = fetchFromGitHub { 11 owner = "crawl-ref"; 12 repo = "crawl-ref"; 13 rev = version; 14 sha256 = "1bzhqrc944rgpdnnid3c5h2r3dvyw70cs70hazzm0cv5aipdkhbl"; 15 }; 16 17 # Patch hard-coded paths in the makefile 18 patches = [ ./crawl_purify.patch ]; 19 20 nativeBuildInputs = [ pkgconfig which perl pngcrush advancecomp ]; 21 22 # Still unstable with luajit 23 buildInputs = [ lua5_1 zlib sqlite ncurses ] 24 ++ lib.optionals tileMode [ libpng SDL2 SDL2_image freetype libGLU_combined ]; 25 26 preBuild = '' 27 cd crawl-ref/source 28 echo "${version}" > util/release_ver 29 patchShebangs 'util' 30 patchShebangs util/gen-mi-enum 31 rm -rf contrib 32 ''; 33 34 fontsPath = lib.optionalString tileMode dejavu_fonts; 35 36 makeFlags = [ "prefix=$(out)" "FORCE_CC=cc" "FORCE_CXX=c++" "HOSTCXX=c++" 37 "SAVEDIR=~/.crawl" "sqlite=${sqlite.dev}" 38 ] ++ lib.optional tileMode "TILES=y"; 39 40 postInstall = lib.optionalString tileMode "mv $out/bin/crawl $out/bin/crawl-tiles"; 41 42 enableParallelBuilding = true; 43 44 meta = with stdenv.lib; { 45 description = "Open-source, single-player, role-playing roguelike game"; 46 homepage = http://crawl.develz.org/; 47 longDescription = '' 48 Open-source, single-player, role-playing roguelike game of exploration and 49 treasure-hunting in dungeons filled with dangerous and unfriendly monsters 50 in a quest to rescue the mystifyingly fabulous Orb of Zot. 51 ''; 52 platforms = platforms.linux; 53 license = with licenses; [ gpl2Plus bsd2 bsd3 mit licenses.zlib cc0 ]; 54 maintainers = [ maintainers.abbradar ]; 55 }; 56}