3
0
Fork 0
forked from mirrors/nixpkgs

* An example of supporting legacy applications using dosbox ;-)

svn path=/nixpkgs/trunk/; revision=6895
This commit is contained in:
Eelco Dolstra 2006-10-28 22:28:35 +00:00
parent f95a93197a
commit c391e5855b
4 changed files with 60 additions and 8 deletions

View file

@ -0,0 +1,31 @@
source $stdenv/setup
ensureDir $out/share/keen4
unzip -j $dist -d $out/share/keen4
ensureDir $out/bin
cat > $out/bin/keen4 <<EOF
#! $SHELL -e
if test -z "\$HOME"; then
echo "HOME directory not set"
exit 1
fi
# Game wants to write in the current directory, but of course we can't
# let it write in the Nix store. So create symlinks to the game files
# in ~/.keen4 and execute game from there.
mkdir -p \$HOME/.keen4
cd \$HOME/.keen4
ln -sf $out/share/keen4/* .
dosbox ./KEEN4E.EXE -fullscreen -exit || true
# Cleanup the symlinks.
for i in *; do
if test -L "\$i"; then
rm "\$i"
fi
done
EOF
chmod +x $out/bin/keen4

View file

@ -0,0 +1,16 @@
{stdenv, fetchurl, dosbox, unzip}:
stdenv.mkDerivation {
name = "keen4";
builder = ./builder.sh;
dist = /home/eelco/keen4.zip;
buildInputs = [unzip];
inherit dosbox;
meta = {
description = "Commander Keen Episode 4: Secret of the Oracle";
};
}

View file

@ -2726,6 +2726,10 @@ rec {
inherit (xlibs) xlibs;
};
keen4 = import ../games/keen4 {
inherit fetchurl stdenv dosbox unzip;
};
### MISC

View file

@ -59,14 +59,13 @@ let {
grub
gzip
hello
# inkscape
jakartaregexp
jetty
jikes
jing_tools
jre
kcachegrind
# kernel
keen4
less
libtool
libxml2
@ -80,7 +79,6 @@ let {
mythtv
nix
nxml
# octave
openssl
pan
par2cmdline
@ -93,10 +91,8 @@ let {
python
qcmm
qt3
# qtparted
quake3demo
readline
# rssglx
screen
sdf
spidermonkey
@ -112,7 +108,6 @@ let {
transformers
uml
unzip
# uuagc
uulib
valgrind
vim
@ -124,7 +119,6 @@ let {
xmms
xorg_sys_opengl
xsel
# zapping
zdelta
zip
# atermjava
@ -132,15 +126,22 @@ let {
# ghc
# helium
# hevea
# inkscape
# jakartabcel
# jjtraveler
# kernel
# monodevelop
# monodoc
# ocaml
# octave
# ov511
# qtparted
# rssglx
# sharedobjects
# uuagc
# xauth
# xawtv
# zapping
;};
powerpcLinuxPkgs = {inherit (allPackages {system = "powerpc-linux";})
@ -177,7 +178,7 @@ let {
libtool
libxml2
libxslt
maven
# maven
nxml
php
# spidermonkey