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; inherit (xlibs) xlibs;
}; };
keen4 = import ../games/keen4 {
inherit fetchurl stdenv dosbox unzip;
};
### MISC ### MISC

View file

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