Added Orbit space flight simulation. Unfortunately, it doesn't feature gravity.
svn path=/nixpkgs/trunk/; revision=10249
This commit is contained in:
@@ -0,0 +1,43 @@
|
|||||||
|
args : with args; with builderDefs {src="";} null;
|
||||||
|
let localDefs = builderDefs rec {
|
||||||
|
src = /* put a fetchurl here */
|
||||||
|
fetchurl {
|
||||||
|
sha256 = "1kx69f9jqnfzwjh47cl1df8p8hn3bnp6bznxnb6c4wx32ijn5gri";
|
||||||
|
url = http://ftp.de.debian.org/debian/pool/main/s/space-orbit/space-orbit_1.01.orig.tar.gz;
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [mesa libXi libXt libXext libX11 libXmu freeglut esound];
|
||||||
|
configureFlags = [];
|
||||||
|
debianPatch =
|
||||||
|
fetchurl {
|
||||||
|
url = http://ftp.de.debian.org/debian/pool/main/s/space-orbit/space-orbit_1.01-9.diff.gz;
|
||||||
|
sha256 = "1v3s97day6fhv08l2rn81waiprhi1lfyjjsj55axfh6n6zqfn1w2";
|
||||||
|
};
|
||||||
|
customBuild = FullDepEntry (''
|
||||||
|
gunzip < ${debianPatch} | patch -Np1
|
||||||
|
cd src
|
||||||
|
sed -e 's@/usr/share/games/orbit/@'$out'/dump/@g' -i *.c
|
||||||
|
sed -e '/DIR=/d' -i Makefile
|
||||||
|
make
|
||||||
|
ensureDir $out/bin
|
||||||
|
cp -r .. $out/dump
|
||||||
|
cat >$out/bin/space-orbit <<EOF
|
||||||
|
#! /bin/sh
|
||||||
|
$out/dump/orbit "\$@"
|
||||||
|
EOF
|
||||||
|
chmod a+x $out/bin/space-orbit
|
||||||
|
'') ["minInit" "doUnpack" "defEnsureDir" "addInputs"];
|
||||||
|
} null; /* null is a terminator for sumArgs */
|
||||||
|
in with localDefs;
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "space-orbit-"+version;
|
||||||
|
builder = writeScript (name + "-builder")
|
||||||
|
(textClosure localDefs
|
||||||
|
[ customBuild doForceShare doPropagate]);
|
||||||
|
meta = {
|
||||||
|
description = "
|
||||||
|
Orbit space flight simulator.
|
||||||
|
";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@@ -4918,6 +4918,17 @@ rec {
|
|||||||
inherit fetchurl stdenv SDL zlib mpeg2dec;
|
inherit fetchurl stdenv SDL zlib mpeg2dec;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# You still can override by passing more arguments.
|
||||||
|
spaceOrbitFun = lib.sumArgs (selectVersion ../games/orbit ) {
|
||||||
|
inherit fetchurl stdenv builderDefs
|
||||||
|
mesa freeglut;
|
||||||
|
inherit (gnome) esound;
|
||||||
|
inherit (xlibs) libXt libX11 libXmu libXi libXext;
|
||||||
|
version = "1.01";
|
||||||
|
};
|
||||||
|
|
||||||
|
spaceOrbit = spaceOrbitFun null;
|
||||||
|
|
||||||
/*tpm = import ../games/thePenguinMachine {
|
/*tpm = import ../games/thePenguinMachine {
|
||||||
inherit stdenv fetchurl pil pygame SDL;
|
inherit stdenv fetchurl pil pygame SDL;
|
||||||
python24 = python;
|
python24 = python;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
args : with args;
|
args : with args; with builderDefs {src="";} null;
|
||||||
let localDefs = builderDefs {
|
let localDefs = builderDefs {
|
||||||
src = /* put a fetchurl here */
|
src = /* put a fetchurl here */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user