2010-07-29 20:55:16 +02:00
|
|
|
{ stdenv, fetchurl, builderDefs, mesa, libXi, libXt, libXext, libX11
|
2012-01-07 22:58:20 +01:00
|
|
|
, libXmu, freeglut }:
|
2010-07-29 20:55:16 +02:00
|
|
|
|
|
|
|
with builderDefs;
|
2008-11-04 22:24:10 +01:00
|
|
|
let localDefs = builderDefs.passthru.function (rec {
|
2008-01-22 18:56:53 +01:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2012-01-07 22:58:20 +01:00
|
|
|
buildInputs = [mesa libXi libXt libXext libX11 libXmu freeglut];
|
2008-01-22 18:56:53 +01:00
|
|
|
configureFlags = [];
|
|
|
|
debianPatch =
|
|
|
|
fetchurl {
|
|
|
|
url = http://ftp.de.debian.org/debian/pool/main/s/space-orbit/space-orbit_1.01-9.diff.gz;
|
|
|
|
sha256 = "1v3s97day6fhv08l2rn81waiprhi1lfyjjsj55axfh6n6zqfn1w2";
|
|
|
|
};
|
2009-05-20 01:25:58 +02:00
|
|
|
customBuild = fullDepEntry (''
|
2008-01-22 18:56:53 +01:00
|
|
|
gunzip < ${debianPatch} | patch -Np1
|
|
|
|
cd src
|
|
|
|
sed -e 's@/usr/share/games/orbit/@'$out'/dump/@g' -i *.c
|
2012-01-07 22:58:20 +01:00
|
|
|
sed -e '/DIR=/d; s/-lesd//; s/-DESD//;' -i Makefile
|
2008-01-22 18:56:53 +01:00
|
|
|
make
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/bin
|
2008-01-22 18:56:53 +01:00
|
|
|
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"];
|
2008-08-19 07:54:09 +02:00
|
|
|
});
|
2008-01-22 18:56:53 +01:00
|
|
|
in with localDefs;
|
|
|
|
stdenv.mkDerivation rec {
|
2009-11-18 10:39:59 +01:00
|
|
|
name = "space-orbit-1.01";
|
2008-01-22 18:56:53 +01:00
|
|
|
builder = writeScript (name + "-builder")
|
|
|
|
(textClosure localDefs
|
|
|
|
[ customBuild doForceShare doPropagate]);
|
|
|
|
meta = {
|
2009-03-03 14:27:40 +01:00
|
|
|
description = "Orbit space flight simulator";
|
2008-03-02 19:49:31 +01:00
|
|
|
inherit src;
|
2008-01-22 18:56:53 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|