2013-10-06 20:36:18 +01:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, freeglut, freealut, mesa, libICE, libjpeg, openal, openscenegraph, plib
|
|
|
|
, libSM, libunwind, libX11, xproto, libXext, xextproto, libXi, inputproto
|
|
|
|
, libXmu, libXt, simgear, zlib, boost, cmake, libpng, udev, fltk13, apr
|
2015-02-17 06:50:11 +00:00
|
|
|
, makeDesktopItem, qt5
|
2013-10-06 20:36:18 +01:00
|
|
|
}:
|
2011-04-09 19:57:00 +01:00
|
|
|
|
2013-10-06 20:36:18 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2015-02-17 06:50:11 +00:00
|
|
|
version = "3.4.0";
|
2013-10-06 20:36:18 +01:00
|
|
|
name = "flightgear-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2015-02-17 06:50:11 +00:00
|
|
|
url = "http://ftp.igh.cnrs.fr/pub/flightgear/ftp/Source/${name}.tar.bz2";
|
|
|
|
sha256 = "102pg7mahgxzypvyp76x363qy3a4gxavr4hj16gsha07nl2msr5m";
|
2011-04-09 19:57:00 +01:00
|
|
|
};
|
|
|
|
|
2013-10-06 20:36:18 +01:00
|
|
|
datasrc = fetchurl {
|
2014-05-28 21:36:54 +01:00
|
|
|
url = "http://ftp.igh.cnrs.fr/pub/flightgear/ftp/Shared/FlightGear-data-${version}.tar.bz2";
|
2015-02-17 06:50:11 +00:00
|
|
|
sha256 = "12qjvycizg693g5jj5qyp1jiwwywg6p9fg6j3zjxhx6r4g1sgvwc";
|
2011-04-09 19:57:00 +01:00
|
|
|
};
|
|
|
|
|
2013-10-21 21:22:24 +01:00
|
|
|
# Of all the files in the source and data archives, there doesn't seem to be
|
|
|
|
# a decent icon :-)
|
|
|
|
iconsrc = fetchurl {
|
|
|
|
url = "http://wiki.flightgear.org/images/6/62/FlightGear_logo.png";
|
|
|
|
sha256 = "1ikz413jia55vfnmx8iwrlxvx8p16ggm81mbrj66wam3q7s2dm5p";
|
|
|
|
};
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "flightgear";
|
|
|
|
exec = "fgfs";
|
|
|
|
icon = "${iconsrc}";
|
|
|
|
comment = "FlightGear Flight Simulator";
|
|
|
|
desktopName = "FlightGear";
|
|
|
|
genericName = "Flight simulator";
|
|
|
|
categories = "Game;Simulation";
|
|
|
|
};
|
|
|
|
|
2013-10-06 20:36:18 +01:00
|
|
|
buildInputs = [
|
|
|
|
freeglut freealut mesa libICE libjpeg openal openscenegraph plib
|
|
|
|
libSM libunwind libX11 xproto libXext xextproto libXi inputproto
|
2015-03-24 15:31:27 +00:00
|
|
|
libXmu libXt simgear zlib boost cmake libpng udev fltk13 apr qt5.base
|
2013-10-06 20:36:18 +01:00
|
|
|
];
|
2011-04-09 19:57:00 +01:00
|
|
|
|
2013-10-06 20:36:18 +01:00
|
|
|
preConfigure = ''
|
|
|
|
export cmakeFlagsArray=(-DFG_DATA_DIR="$out/share/FlightGear/")
|
|
|
|
'';
|
2011-04-09 19:57:00 +01:00
|
|
|
|
2013-10-06 20:36:18 +01:00
|
|
|
postInstall = ''
|
2013-10-21 21:22:24 +01:00
|
|
|
mkdir -p "$out/share/applications/"
|
|
|
|
cp "${desktopItem}"/share/applications/* "$out/share/applications/"
|
2014-05-28 21:36:54 +01:00
|
|
|
|
|
|
|
mkdir -p "$out/share/FlightGear"
|
|
|
|
tar xvf "${datasrc}" -C "$out/share/FlightGear/" --strip-components=1
|
2013-10-06 20:36:18 +01:00
|
|
|
'';
|
2013-02-23 19:32:12 +00:00
|
|
|
|
2013-10-06 20:36:18 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Flight simulator";
|
2014-01-15 20:36:34 +00:00
|
|
|
maintainers = with maintainers; [ raskin the-kenny ];
|
2013-11-04 23:04:36 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
hydraPlatforms = []; # disabled from hydra because it's so big
|
2013-10-06 20:36:18 +01:00
|
|
|
license = licenses.gpl2;
|
2011-04-09 19:57:00 +01:00
|
|
|
};
|
2013-10-06 20:36:18 +01:00
|
|
|
}
|