2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl
|
2019-11-10 17:44:34 +01:00
|
|
|
, libGLU, libGL, libXi, libXt, libXext, libX11, libXmu, freeglut
|
2016-03-03 18:54:59 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "space-orbit";
|
2016-03-03 18:54:59 +01:00
|
|
|
version = "1.01";
|
|
|
|
patchversion = "9";
|
|
|
|
|
2019-11-10 17:44:34 +01:00
|
|
|
buildInputs = [ libGLU libGL libXi libXt libXext libX11 libXmu freeglut ];
|
2016-03-03 18:54:59 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://debian/pool/main/s/space-orbit/space-orbit_${version}.orig.tar.gz";
|
|
|
|
sha256 = "1kx69f9jqnfzwjh47cl1df8p8hn3bnp6bznxnb6c4wx32ijn5gri";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(fetchurl {
|
|
|
|
url = "mirror://debian/pool/main/s/space-orbit/space-orbit_${version}-${patchversion}.diff.gz";
|
|
|
|
sha256 = "1v3s97day6fhv08l2rn81waiprhi1lfyjjsj55axfh6n6zqfn1w2";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
cd src
|
|
|
|
sed -e 's@/usr/share/games/orbit/@'$out'/dump/@g' -i *.c
|
|
|
|
sed -e '/DIR=/d; s/-lesd//; s/-DESD//;' -i Makefile
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -r .. $out/dump
|
|
|
|
cat >$out/bin/space-orbit <<EOF
|
|
|
|
#! ${stdenv.shell}
|
|
|
|
exec $out/dump/orbit "\$@"
|
|
|
|
EOF
|
|
|
|
chmod a+x $out/bin/space-orbit
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2022-05-28 15:23:50 +02:00
|
|
|
broken = stdenv.isDarwin;
|
2016-03-03 18:54:59 +01:00
|
|
|
description = "A space combat simulator";
|
2024-03-19 03:14:51 +01:00
|
|
|
mainProgram = "space-orbit";
|
2016-03-03 18:54:59 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|