pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / games / instead / default.nix
blob9a68983dc2041e7d1d324619c378e28ea025d5f0
1 { lib, stdenv, fetchurl, SDL2, SDL2_ttf, SDL2_image, SDL2_mixer, pkg-config, lua, zlib, unzip }:
3 let
4   # I took several games at random from https://instead.syscall.ru/games/
5   games = [
6     (fetchurl {
7       url = "http://instead-games.googlecode.com/files/instead-apple-day-1.2.zip";
8       sha256 = "0d4m554hiqmgl4xl0jp0b3bqjl35879768hqznh9y57y04sygd2a";
9     })
10     (fetchurl {
11       url = "http://instead-games.googlecode.com/files/instead-cat_en-1.2.zip";
12       sha256 = "0jlm3ssqlka16dm0rg6qfjh6xdh3pv7lj2s4ib4mqwj2vfy0v6sg";
13     })
14     (fetchurl {
15       url = "http://instead-games.googlecode.com/files/instead-vinny-0.1.zip";
16       sha256 = "15qdbg82zp3a8vz4qxminr0xbzbdpnsciliy2wm3raz4hnadawg1";
17     })
18     (fetchurl {
19       url = "http://instead-games.googlecode.com/files/instead-toilet3in1-1.2.zip";
20       sha256 = "0wz4bljbg67m84qwpaqpzs934a5pcbhpgh39fvbbbfvnnlm4lirl";
21     })
22     (fetchurl {
23       url = "http://instead-games.googlecode.com/files/instead-kayleth-0.4.1.zip";
24       sha256 = "0xmn9inys0kbcdd02qaqp8gazqs67xq3fq7hvcy2qb9jbq85j8b2";
25     })
26   ];
29 stdenv.mkDerivation rec {
30   pname = "instead";
31   version = "3.3.2";
33   src = fetchurl {
34     url = "mirror://sourceforge/project/instead/instead/${version}/instead_${version}.tar.gz";
35     sha256 = "u5j2kDKRvMQPsG8iA6uOBScuyE/e1BJIK2+qVL6jqQs=";
36   };
38   NIX_LDFLAGS = "-llua -lgcc_s";
40   nativeBuildInputs = [ pkg-config unzip ];
41   buildInputs = [ SDL2 SDL2_ttf SDL2_image SDL2_mixer lua zlib ];
43   postPatch = ''
44     substituteInPlace configure.sh \
45       --replace "/tmp/sdl-test" $(mktemp)
46   '';
48   configurePhase = ''
49     { echo 2; echo $out; } | ./configure.sh
50   '';
52   inherit games;
54   postInstall = ''
55     pushd $out/share/instead/games
56     for a in $games; do
57       unzip $a
58     done
59     popd
60   '';
62   enableParallelBuilding = true;
64   meta = with lib; {
65     description = "Simple text adventure interpreter for Unix and Windows";
66     homepage = "https://instead.syscall.ru/";
67     license = lib.licenses.mit;
68     platforms = with lib.platforms; linux;
69     maintainers = with maintainers; [ pSub ];
70   };