2019-08-06 22:06:40 +02:00
|
|
|
{ stdenv, fetchurl, wrapQtAppsHook
|
2018-02-24 14:12:44 +01:00
|
|
|
, freeglut, freealut, libGLU_combined, libICE, libjpeg, openal, openscenegraph, plib
|
2018-12-31 04:40:47 +01:00
|
|
|
, libSM, libunwind, libX11, xorgproto, libXext, libXi
|
2013-10-06 21:36:18 +02:00
|
|
|
, libXmu, libXt, simgear, zlib, boost, cmake, libpng, udev, fltk13, apr
|
2017-09-28 19:09:17 +02:00
|
|
|
, makeDesktopItem, qtbase, qtdeclarative, glew
|
2013-10-06 21:36:18 +02:00
|
|
|
}:
|
2011-04-09 20:57:00 +02:00
|
|
|
|
2016-12-24 22:57:25 +01:00
|
|
|
let
|
2019-08-06 22:06:40 +02:00
|
|
|
version = "2019.1.1";
|
|
|
|
shortVersion = builtins.substring 0 6 version;
|
2016-12-24 22:57:25 +01:00
|
|
|
data = stdenv.mkDerivation rec {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "flightgear-base";
|
|
|
|
inherit version;
|
2016-12-24 22:57:25 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/flightgear/release-${shortVersion}/FlightGear-${version}-data.tar.bz2";
|
2019-08-06 22:06:40 +02:00
|
|
|
sha256 = "14zm0hzshbca4ych72631hpc4pw2w24zib62ri3lwm8nz6j63qhf";
|
2016-12-24 22:57:25 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
phases = [ "installPhase" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/share/FlightGear"
|
|
|
|
tar xf "${src}" -C "$out/share/FlightGear/" --strip-components=1
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
in
|
2013-10-06 21:36:18 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-06 22:06:40 +02:00
|
|
|
pname = "flightgear";
|
2017-01-18 16:57:19 +01:00
|
|
|
# inheriting data for `nix-prefetch-url -A pkgs.flightgear.data.src`
|
|
|
|
inherit version data;
|
2013-10-06 21:36:18 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-06 22:06:40 +02:00
|
|
|
url = "mirror://sourceforge/flightgear/release-${shortVersion}/${pname}-${version}.tar.bz2";
|
|
|
|
sha256 = "189wal08p9lrz757pmazxnf85sfymsqrm3nfvdad95pfp6bg7pyi";
|
2011-04-09 20:57:00 +02:00
|
|
|
};
|
|
|
|
|
2013-10-21 22:22:24 +02: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";
|
2019-09-09 01:38:31 +02:00
|
|
|
icon = iconsrc;
|
2013-10-21 22:22:24 +02:00
|
|
|
comment = "FlightGear Flight Simulator";
|
|
|
|
desktopName = "FlightGear";
|
|
|
|
genericName = "Flight simulator";
|
|
|
|
categories = "Game;Simulation";
|
|
|
|
};
|
|
|
|
|
2019-08-06 22:06:40 +02:00
|
|
|
nativeBuildInputs = [ cmake wrapQtAppsHook ];
|
2013-10-06 21:36:18 +02:00
|
|
|
buildInputs = [
|
2018-02-24 14:12:44 +01:00
|
|
|
freeglut freealut libGLU_combined libICE libjpeg openal openscenegraph plib
|
2018-12-31 04:40:47 +01:00
|
|
|
libSM libunwind libX11 xorgproto libXext libXi
|
2019-08-06 22:06:40 +02:00
|
|
|
libXmu libXt simgear zlib boost libpng udev fltk13 apr qtbase
|
2017-09-28 19:09:17 +02:00
|
|
|
glew qtdeclarative
|
2013-10-06 21:36:18 +02:00
|
|
|
];
|
2011-04-09 20:57:00 +02:00
|
|
|
|
2013-10-06 21:36:18 +02:00
|
|
|
postInstall = ''
|
2013-10-21 22:22:24 +02:00
|
|
|
mkdir -p "$out/share/applications/"
|
2016-12-24 22:57:25 +01:00
|
|
|
cp "${desktopItem}"/share/applications/* "$out/share/applications/" #*/
|
2013-10-06 21:36:18 +02:00
|
|
|
'';
|
2013-02-23 20:32:12 +01:00
|
|
|
|
2019-07-05 17:42:08 +02:00
|
|
|
qtWrapperArgs = [
|
2019-08-06 22:06:40 +02:00
|
|
|
"--set FG_ROOT ${data}/share/FlightGear"
|
2019-07-05 17:42:08 +02:00
|
|
|
];
|
|
|
|
|
2017-09-28 19:09:17 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2013-10-06 21:36:18 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Flight simulator";
|
2014-01-15 21:36:34 +01:00
|
|
|
maintainers = with maintainers; [ raskin the-kenny ];
|
2013-11-05 00:04:36 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
hydraPlatforms = []; # disabled from hydra because it's so big
|
2013-10-06 21:36:18 +02:00
|
|
|
license = licenses.gpl2;
|
2011-04-09 20:57:00 +02:00
|
|
|
};
|
2013-10-06 21:36:18 +02:00
|
|
|
}
|