| 
									
										
										
										
											2010-09-30 18:58:48 +00:00
										 |  |  | { stdenv, fetchurl, SDL, SDL_ttf, SDL_image, SDL_mixer, pkgconfig, lua, zlib, unzip }: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | let | 
					
						
							| 
									
										
										
										
											2015-04-08 16:06:09 +02:00
										 |  |  |   version = "2.2.3"; | 
					
						
							| 
									
										
										
										
											2010-09-30 18:58:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-08-18 00:19:54 +04:00
										 |  |  |   # I took several games at random from http://instead.syscall.ru/games/ | 
					
						
							| 
									
										
										
										
											2010-09-30 18:58:48 +00:00
										 |  |  |   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_en-1.2.zip; | 
					
						
							|  |  |  |       sha256 = "0jlm3ssqlka16dm0rg6qfjh6xdh3pv7lj2s4ib4mqwj2vfy0v6sg"; | 
					
						
							|  |  |  |     }) | 
					
						
							|  |  |  |     (fetchurl { | 
					
						
							|  |  |  |       url = http://instead-games.googlecode.com/files/instead-vinny-0.1.zip; | 
					
						
							|  |  |  |       sha256 = "15qdbg82zp3a8vz4qxminr0xbzbdpnsciliy2wm3raz4hnadawg1"; | 
					
						
							|  |  |  |     }) | 
					
						
							| 
									
										
										
										
											2010-12-20 17:34:49 +00:00
										 |  |  |     (fetchurl { | 
					
						
							| 
									
										
										
										
											2013-08-18 00:19:54 +04:00
										 |  |  |       url = http://instead-games.googlecode.com/files/instead-toilet3in1-1.2.zip; | 
					
						
							|  |  |  |       sha256 = "0wz4bljbg67m84qwpaqpzs934a5pcbhpgh39fvbbbfvnnlm4lirl"; | 
					
						
							|  |  |  |     }) | 
					
						
							|  |  |  |     (fetchurl { | 
					
						
							|  |  |  |       url = http://instead-games.googlecode.com/files/instead-kayleth-0.4.1.zip; | 
					
						
							|  |  |  |       sha256 = "0xmn9inys0kbcdd02qaqp8gazqs67xq3fq7hvcy2qb9jbq85j8b2"; | 
					
						
							| 
									
										
										
										
											2010-12-20 17:34:49 +00:00
										 |  |  |     }) | 
					
						
							| 
									
										
										
										
											2010-09-30 18:58:48 +00:00
										 |  |  |   ]; | 
					
						
							|  |  |  | in | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | stdenv.mkDerivation rec { | 
					
						
							|  |  |  |   name = "instead-" + version; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   src = fetchurl { | 
					
						
							| 
									
										
										
										
											2013-08-18 00:19:54 +04:00
										 |  |  |     url = "http://downloads.sourceforge.net/project/instead/instead/${version}/instead_${version}.tar.gz"; | 
					
						
							| 
									
										
										
										
											2015-04-08 16:06:09 +02:00
										 |  |  |     sha256 = "0g01z5z7777pwlsv63gwx4ly61hgqxv53hhb6g22dc5ydaq4965h"; | 
					
						
							| 
									
										
										
										
											2010-09-30 18:58:48 +00:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   NIX_LDFLAGS = "-llua -lgcc_s"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   buildInputs = [ SDL SDL_ttf SDL_image SDL_mixer pkgconfig lua zlib unzip ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   configurePhase = ''
 | 
					
						
							| 
									
										
										
										
											2013-08-18 00:19:54 +04:00
										 |  |  |     { echo 2; echo $out; } | ./configure.sh | 
					
						
							| 
									
										
										
										
											2010-09-30 18:58:48 +00:00
										 |  |  |   '';
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   inherit games; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   installPhase = ''
 | 
					
						
							| 
									
										
										
										
											2013-08-18 00:19:54 +04:00
										 |  |  |     make install | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     pushd $out/share/instead/games | 
					
						
							| 
									
										
										
										
											2010-09-30 18:58:48 +00:00
										 |  |  |     for a in $games; do | 
					
						
							|  |  |  |       unzip $a | 
					
						
							|  |  |  |     done | 
					
						
							|  |  |  |     popd | 
					
						
							|  |  |  |   '';
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-01-15 00:42:17 +01:00
										 |  |  |   meta = with stdenv.lib; { | 
					
						
							| 
									
										
										
										
											2010-09-30 18:58:48 +00:00
										 |  |  |     description = "Simple text adventure interpreter for Unix and Windows"; | 
					
						
							|  |  |  |     homepage = http://instead.syscall.ru/; | 
					
						
							| 
									
										
										
										
											2014-06-19 06:19:00 +02:00
										 |  |  |     license = stdenv.lib.licenses.gpl2; | 
					
						
							| 
									
										
										
										
											2010-09-30 18:58:48 +00:00
										 |  |  |     platforms = with stdenv.lib.platforms; linux; | 
					
						
							| 
									
										
										
										
											2015-01-15 00:42:17 +01:00
										 |  |  |     maintainers = with maintainers; [ pSub ]; | 
					
						
							| 
									
										
										
										
											2010-09-30 18:58:48 +00:00
										 |  |  |   }; | 
					
						
							|  |  |  | } |