at 17.09-beta 66 lines 2.0 kB view raw
1{ stdenv, fetchurl, SDL, SDL_ttf, SDL_image, SDL_mixer, pkgconfig, lua, zlib, unzip }: 2 3let 4 version = "3.0.1"; 5 6 # I took several games at random from http://instead.syscall.ru/games/ 7 games = [ 8 (fetchurl { 9 url = http://instead-games.googlecode.com/files/instead-apple-day-1.2.zip; 10 sha256 = "0d4m554hiqmgl4xl0jp0b3bqjl35879768hqznh9y57y04sygd2a"; 11 }) 12 (fetchurl { 13 url = http://instead-games.googlecode.com/files/instead-cat_en-1.2.zip; 14 sha256 = "0jlm3ssqlka16dm0rg6qfjh6xdh3pv7lj2s4ib4mqwj2vfy0v6sg"; 15 }) 16 (fetchurl { 17 url = http://instead-games.googlecode.com/files/instead-vinny-0.1.zip; 18 sha256 = "15qdbg82zp3a8vz4qxminr0xbzbdpnsciliy2wm3raz4hnadawg1"; 19 }) 20 (fetchurl { 21 url = http://instead-games.googlecode.com/files/instead-toilet3in1-1.2.zip; 22 sha256 = "0wz4bljbg67m84qwpaqpzs934a5pcbhpgh39fvbbbfvnnlm4lirl"; 23 }) 24 (fetchurl { 25 url = http://instead-games.googlecode.com/files/instead-kayleth-0.4.1.zip; 26 sha256 = "0xmn9inys0kbcdd02qaqp8gazqs67xq3fq7hvcy2qb9jbq85j8b2"; 27 }) 28 ]; 29in 30 31stdenv.mkDerivation rec { 32 name = "instead-" + version; 33 34 src = fetchurl { 35 url = "mirror://sourceforge/project/instead/instead/${version}/instead_${version}.tar.gz"; 36 sha256 = "0ynqzmr35zd1vbbv8n3vk93zj0njhs45w9z33wwkphg2zlniwnzb"; 37 }; 38 39 NIX_LDFLAGS = "-llua -lgcc_s"; 40 41 buildInputs = [ SDL SDL_ttf SDL_image SDL_mixer pkgconfig lua zlib unzip ]; 42 43 configurePhase = '' 44 { echo 2; echo $out; } | ./configure.sh 45 ''; 46 47 inherit games; 48 49 installPhase = '' 50 make install 51 52 pushd $out/share/instead/games 53 for a in $games; do 54 unzip $a 55 done 56 popd 57 ''; 58 59 meta = with stdenv.lib; { 60 description = "Simple text adventure interpreter for Unix and Windows"; 61 homepage = http://instead.syscall.ru/; 62 license = stdenv.lib.licenses.gpl2; 63 platforms = with stdenv.lib.platforms; linux; 64 maintainers = with maintainers; [ pSub ]; 65 }; 66}