diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2010-09-30 18:58:48 +0000 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2010-09-30 18:58:48 +0000 |
commit | 1019692db7eada5e6dc82675b8f2bfd3c48455a1 (patch) | |
tree | f387c964dae14dbcd6889c750c68c7f3f30b0e88 /pkgs/games/instead | |
parent | 8db80a9616e1e5bcfc9cfb5c15a97350540bf579 (diff) | |
download | nixlib-1019692db7eada5e6dc82675b8f2bfd3c48455a1.tar nixlib-1019692db7eada5e6dc82675b8f2bfd3c48455a1.tar.gz nixlib-1019692db7eada5e6dc82675b8f2bfd3c48455a1.tar.bz2 nixlib-1019692db7eada5e6dc82675b8f2bfd3c48455a1.tar.lz nixlib-1019692db7eada5e6dc82675b8f2bfd3c48455a1.tar.xz nixlib-1019692db7eada5e6dc82675b8f2bfd3c48455a1.tar.zst nixlib-1019692db7eada5e6dc82675b8f2bfd3c48455a1.zip |
Adding the game engine 'instead' and some games.
svn path=/nixpkgs/trunk/; revision=24009
Diffstat (limited to 'pkgs/games/instead')
-rw-r--r-- | pkgs/games/instead/default.nix | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/pkgs/games/instead/default.nix b/pkgs/games/instead/default.nix new file mode 100644 index 000000000000..344daca2a0d3 --- /dev/null +++ b/pkgs/games/instead/default.nix @@ -0,0 +1,62 @@ +{ stdenv, fetchurl, SDL, SDL_ttf, SDL_image, SDL_mixer, pkgconfig, lua, zlib, unzip }: + +let + version = "1.2.2"; + + # I took two games at random from http://instead.syscall.ru/games/ + games = [ + (fetchurl { + url = http://instead-games.googlecode.com/files/instead-apple-day-1.2.zip; + sha256 = "0d4m554hiqmgl4xl0jp0b3bqjl35879768hqznh9y57y04sygd2a"; + }) + (fetchurl { + url = http://instead-games.googlecode.com/files/instead-cat-1.3.zip; + sha256 = "0vmsn7jg2vy5kqqbzad289vk4j3piarj1xpwyz72wgyc3k7djg4v"; + }) + (fetchurl { + url = http://instead-games.googlecode.com/files/instead-cat_en-1.2.zip; + sha256 = "0jlm3ssqlka16dm0rg6qfjh6xdh3pv7lj2s4ib4mqwj2vfy0v6sg"; + }) + (fetchurl { + url = http://instead-games.googlecode.com/files/instead-vinny-0.1.zip; + sha256 = "15qdbg82zp3a8vz4qxminr0xbzbdpnsciliy2wm3raz4hnadawg1"; + }) + ]; +in + +stdenv.mkDerivation rec { + name = "instead-" + version; + + src = fetchurl { + url = "http://instead.googlecode.com/files/instead_${version}.tar.gz"; + sha256 = "178xxqvjl5v1bhjrlf8cqpkw85j25fldf0wn6bgyzicr6fspxb25"; + }; + + NIX_LDFLAGS = "-llua -lgcc_s"; + + buildInputs = [ SDL SDL_ttf SDL_image SDL_mixer pkgconfig lua zlib unzip ]; + + configurePhase = '' + sed -i -e "s,DATAPATH=.,DATAPATH=$out/share/${name}/," Rules.make + ''; + + inherit games; + + installPhase = '' + ensureDir $out/bin $out/share/${name} + cp sdl-instead $out/bin + cp -R games languages stead themes $out/share/${name} + pushd $out/share/${name}/games + for a in $games; do + unzip $a + done + popd + ''; + + meta = { + description = "Simple text adventure interpreter for Unix and Windows"; + homepage = http://instead.syscall.ru/; + license = "GPLv2"; + platforms = with stdenv.lib.platforms; linux; + }; +} |