nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
fork

Configure Feed

Select the types of activity you want to include in your feed.

at netboot-syslinux-multiplatform 77 lines 3.1 kB view raw
1{ stdenv, lib, fetchFromGitHub, fetchpatch, which, sqlite, lua5_1, perl, python3, zlib, pkg-config, ncurses 2, dejavu_fonts, libpng, SDL2, SDL2_image, SDL2_mixer, libGLU, libGL, freetype, pngcrush, advancecomp 3, tileMode ? false, enableSound ? tileMode, buildPackages 4 5# MacOS / Darwin builds 6, darwin ? null 7}: 8 9stdenv.mkDerivation rec { 10 pname = "crawl${lib.optionalString tileMode "-tiles"}"; 11 version = "0.29.0"; 12 13 src = fetchFromGitHub { 14 owner = "crawl"; 15 repo = "crawl"; 16 rev = version; 17 sha256 = "sha256-SM8dSDV+88QGMqoFkITop1PHh9EakdgiV4tkXCw9pjM="; 18 }; 19 20 # Patch hard-coded paths and remove force library builds 21 patches = [ ./crawl_purify.patch ]; 22 23 nativeBuildInputs = [ pkg-config which perl pngcrush advancecomp ]; 24 25 # Still unstable with luajit 26 buildInputs = [ lua5_1 zlib sqlite ncurses ] 27 ++ (with python3.pkgs; [ pyyaml ]) 28 ++ lib.optionals tileMode [ libpng SDL2 SDL2_image freetype libGLU libGL ] 29 ++ lib.optional enableSound SDL2_mixer 30 ++ (lib.optionals stdenv.isDarwin ( 31 assert (lib.assertMsg (darwin != null) "Must have darwin frameworks available for darwin builds"); 32 with darwin.apple_sdk.frameworks; [ 33 AppKit AudioUnit CoreAudio ForceFeedback Carbon IOKit OpenGL 34 ] 35 )); 36 37 preBuild = '' 38 cd crawl-ref/source 39 echo "${version}" > util/release_ver 40 patchShebangs 'util' 41 patchShebangs util/gen-mi-enum 42 rm -rf contrib 43 ''; 44 45 fontsPath = lib.optionalString tileMode dejavu_fonts; 46 47 makeFlags = [ "prefix=${placeholder "out"}" "FORCE_CC=${stdenv.cc.targetPrefix}cc" "FORCE_CXX=${stdenv.cc.targetPrefix}c++" "HOSTCXX=${buildPackages.stdenv.cc.targetPrefix}c++" 48 "FORCE_PKGCONFIG=y" 49 "SAVEDIR=~/.crawl" "sqlite=${sqlite.dev}" 50 "DATADIR=${placeholder "out"}" 51 ] ++ lib.optional tileMode "TILES=y" 52 ++ lib.optional enableSound "SOUND=y"; 53 54 postInstall = '' 55 ${lib.optionalString tileMode "mv $out/bin/crawl $out/bin/crawl-tiles"} 56 sed -i 's#/usr/games/##' debian/crawl${lib.optionalString tileMode "-tiles"}.desktop 57 install -m 444 -D debian/crawl${lib.optionalString tileMode "-tiles"}.desktop \ 58 $out/share/applications/crawl${lib.optionalString tileMode "-tiles"}.desktop 59 install -m 444 -D dat/tiles/stone_soup_icon-512x512.png $out/share/icons/hicolor/512x512/apps/crawl.png 60 ''; 61 62 enableParallelBuilding = true; 63 64 meta = with lib; { 65 description = "Open-source, single-player, role-playing roguelike game"; 66 homepage = "http://crawl.develz.org/"; 67 longDescription = '' 68 Dungeon Crawl: Stone Soup, an open-source, single-player, role-playing 69 roguelike game of exploration and treasure-hunting in dungeons filled 70 with dangerous and unfriendly monsters in a quest to rescue the 71 mystifyingly fabulous Orb of Zot. 72 ''; 73 platforms = platforms.linux ++ platforms.darwin; 74 license = with licenses; [ gpl2Plus bsd2 bsd3 mit licenses.zlib cc0 ]; 75 maintainers = [ maintainers.abbradar ]; 76 }; 77}