mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-31 14:41:27 +00:00
* An example of supporting legacy applications using dosbox ;-)
svn path=/nixpkgs/trunk/; revision=6895
This commit is contained in:
parent
f95a93197a
commit
c391e5855b
31
pkgs/games/keen4/builder.sh
Normal file
31
pkgs/games/keen4/builder.sh
Normal 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
|
16
pkgs/games/keen4/default.nix
Normal file
16
pkgs/games/keen4/default.nix
Normal 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";
|
||||
};
|
||||
}
|
@ -2726,6 +2726,10 @@ rec {
|
||||
inherit (xlibs) xlibs;
|
||||
};
|
||||
|
||||
keen4 = import ../games/keen4 {
|
||||
inherit fetchurl stdenv dosbox unzip;
|
||||
};
|
||||
|
||||
|
||||
### MISC
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user