2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl
|
2024-07-27 06:49:29 +00:00
|
|
|
, libGLU, libGL, libXi, libXt, libXext, libX11, libXmu, libglut
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "space-orbit";
|
|
|
|
version = "1.01";
|
|
|
|
patchversion = "9";
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
buildInputs = [ libGLU libGL libXi libXt libXext libX11 libXmu libglut ];
|
2020-04-24 23:36:52 +00: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-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-09-26 11:04:55 +00:00
|
|
|
broken = stdenv.hostPlatform.isDarwin;
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Space combat simulator";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "space-orbit";
|
2024-07-27 06:49:29 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|