@@ -1,48 +0,0 @@
1−{stdenv, fetchurl, python, pillow, pygame, SDL} @ args: with args;
2−stdenv.mkDerivation {
3− name = "thePenguinMachine";
4−
5− src = fetchurl {
6− url = http://www.migniot.com/matrix/projects/thepenguinmachine/ThePenguinMachine.tar.gz;
7− sha256 = "09ljks8vj75g00h3azc83yllbfsrxwmv1c9g32gylcmsshik0dqv";
8− };
9− # Perhaps the following source works? See http://tpm.seul.org/
10− # url = http://tpm.seul.org/TPM.tar.bz2;
11− # sha256 = "8fc2f2961a54005cd7f349dd859823addf05b01d0e3b3e83928b5b75460930fa";
12−
13− broken = true; # Not found
14−
15− buildInputs = [python pillow pygame SDL];
16−
17− configurePhase = ''
18− sed -e "/includes = /aincludes.append('${SDL}/include/SDL')" -i setup.py;
19− sed -e "/includes = /aincludes.append('$(echo ${pygame}/include/python*)')" -i setup.py;
20− cat setup.py;
21− export NIX_LDFLAGS="$NIX_LDFLAGS -lgcc_s"
22− '';
23− buildPhase = ''
24− sed -e "s/pygame.display.toggle_fullscreen.*/pass;/" -i tpm/Application.py
25− sed -e 's@"Surface"@"pygame.Surface"@' -i src/surfutils.c
26− python setup.py build;
27− python setup.py build_clib;
28− python setup.py build_ext;
29− python setup.py build_py;
30− python setup.py build_scripts;
31− '';
32− installPhase = ''
33− python setup.py install --prefix=$out
34− mkdir -p "$out"/share/tpm/
35− cp -r . "$out"/share/tpm/build-dir
36− mkdir -p "$out/bin"
37− echo "#! /bin/sh" >> "$out/bin/tpm"
38− echo "export PYTHONPATH=\"\$PYTHONPATH:$PYTHONPATH:$(echo ${pillow}/lib/python*/site-packages/PIL)\"" >> "$out/bin/tpm"
39− echo "cd \"$out/share/tpm/build-dir\"" >> "$out/bin/tpm"
40− echo "export PYTHONPATH=\"\$PYTHONPATH:$PYTHONPATH:$(echo ${pillow}/lib/python*/site-packages/PIL)\"" >> "$out/bin/tpm"
41− echo "${python}/bin/python \"$out\"/share/tpm/build-dir/ThePenguinMachine.py \"\$@\"" >> "$out/bin/tpm"
42− chmod a+x "$out/bin/tpm"
43− '';
44−
45− meta = {
46− description = "An Incredible Machine clone";
47− };
48−}