2010-07-28 16:35:01 +01:00
|
|
|
{ stdenv, fetchurl, libX11, libXpm, libXext, xextproto, byacc }:
|
|
|
|
|
2008-08-06 21:39:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2015-08-24 07:22:09 +01:00
|
|
|
name = "micropolis-2010-12-18"; # version from the patch timestamp
|
2008-08-06 21:39:01 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = http://www.donhopkins.com/home/micropolis/micropolis-activity-source.tgz;
|
|
|
|
sha256 = "1b3c72dc3680a34b5fc5a740a6fb5cfc0b8775514da8ab7bb3b2965b20d4f8bc";
|
|
|
|
};
|
|
|
|
|
2010-07-28 16:35:01 +01:00
|
|
|
patches =
|
|
|
|
[ (fetchurl {
|
|
|
|
url = http://rmdir.de/~michael/micropolis_git.patch;
|
2017-02-28 11:46:07 +00:00
|
|
|
sha256 = "10j0svcs576ip7v5mn99gvqx9ki8jfd5w5yvsxj57xh56dd0by2p";
|
2010-07-28 16:35:01 +01:00
|
|
|
})
|
|
|
|
];
|
2008-08-06 21:39:01 +01:00
|
|
|
|
|
|
|
buildInputs = [ libX11 libXpm libXext xextproto byacc ];
|
|
|
|
|
2010-07-28 16:35:01 +01:00
|
|
|
preConfigure =
|
|
|
|
''
|
|
|
|
cd src
|
2015-10-13 20:51:53 +01:00
|
|
|
sed -i "s@^CFLAGS.*\$@&\nCFLAGS += -I${libXpm.dev}/include/X11@" tk/makefile
|
2008-08-06 21:39:01 +01:00
|
|
|
sed -i "s@^INCLUDES.*\$@&\n\t-I$PWD/tcl \\\\@" sim/makefile
|
2010-07-28 16:35:01 +01:00
|
|
|
'';
|
2008-08-06 21:39:01 +01:00
|
|
|
|
2010-07-28 16:35:01 +01:00
|
|
|
postInstall =
|
|
|
|
''
|
|
|
|
mkdir -p $out/bin
|
2008-08-06 21:39:01 +01:00
|
|
|
mkdir -p $out/usr/share/games/micropolis
|
|
|
|
cd ..
|
|
|
|
for d in activity cities images manual res; do
|
|
|
|
cp -R $d $out/usr/share/games/micropolis
|
|
|
|
done
|
|
|
|
cp Micropolis $out/usr/share/games/micropolis
|
2016-10-01 10:17:30 +01:00
|
|
|
cat > $out/bin/micropolis << EOF
|
|
|
|
#!${stdenv.shell}
|
2010-07-28 16:35:01 +01:00
|
|
|
cd $out/usr/share/games/micropolis
|
|
|
|
./Micropolis
|
|
|
|
EOF
|
2008-08-06 21:39:01 +01:00
|
|
|
chmod 755 $out/bin/micropolis
|
2010-07-28 16:35:01 +01:00
|
|
|
'';
|
2008-08-06 21:39:01 +01:00
|
|
|
|
2015-08-24 07:22:09 +01:00
|
|
|
meta = {
|
2010-07-28 16:35:01 +01:00
|
|
|
description = "GPL'ed version of S*m C*ty";
|
|
|
|
homepage = http://www.donhopkins.com/home/micropolis/;
|
|
|
|
license = "GPL";
|
2008-08-06 21:39:01 +01:00
|
|
|
};
|
|
|
|
}
|