2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, wrapQtAppsHook
|
2019-11-10 17:44:34 +01:00
|
|
|
, freeglut, freealut, libGLU, libGL, 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
|
2022-11-13 23:43:07 +01:00
|
|
|
, makeDesktopItem, qtbase, qtdeclarative, glew, curl
|
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
|
2023-11-07 07:25:29 +01:00
|
|
|
version = "2020.3.19";
|
2019-08-06 22:06:40 +02:00
|
|
|
shortVersion = builtins.substring 0 6 version;
|
2016-12-24 22:57:25 +01:00
|
|
|
data = stdenv.mkDerivation rec {
|
2020-07-01 14:57:03 +02:00
|
|
|
pname = "flightgear-data";
|
2019-08-13 23:52:01 +02:00
|
|
|
inherit version;
|
2016-12-24 22:57:25 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-04-18 01:04:38 +02:00
|
|
|
url = "mirror://sourceforge/flightgear/release-${shortVersion}/FlightGear-${version}-data.txz";
|
2023-11-07 07:25:29 +01:00
|
|
|
sha256 = "sha256-863EnNBU+rYTdxHwMV6HbBu99lO6H3mKGuyumm6YR5U=";
|
2016-12-24 22:57:25 +01:00
|
|
|
};
|
|
|
|
|
2021-08-03 10:50:40 +02:00
|
|
|
dontUnpack = true;
|
2016-12-24 22:57:25 +01:00
|
|
|
|
|
|
|
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";
|
2023-05-15 07:57:52 +02:00
|
|
|
# inheriting data for `nix-prefetch-url -A pkgs.flightgear.data.src`
|
2017-01-18 16:57:19 +01:00
|
|
|
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";
|
2023-11-07 07:25:29 +01:00
|
|
|
sha256 = "sha256-Fn0I3pzA9yIYs3myPNflbH9u4Y19VZUS2lGjvWfzjm4=";
|
2011-04-09 20:57:00 +02:00
|
|
|
};
|
|
|
|
|
2019-08-06 22:06:40 +02:00
|
|
|
nativeBuildInputs = [ cmake wrapQtAppsHook ];
|
2013-10-06 21:36:18 +02:00
|
|
|
buildInputs = [
|
2019-11-10 17:44:34 +01:00
|
|
|
freeglut freealut libGLU libGL 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
|
2022-11-13 23:43:07 +01:00
|
|
|
glew qtdeclarative curl
|
2013-10-06 21:36:18 +02:00
|
|
|
];
|
2011-04-09 20:57:00 +02: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
|
|
|
];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2013-10-06 21:36:18 +02:00
|
|
|
description = "Flight simulator";
|
2020-05-09 11:25:07 +02:00
|
|
|
maintainers = with maintainers; [ raskin ];
|
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;
|
2023-11-07 07:25:29 +01:00
|
|
|
mainProgram = "fgfs";
|
2011-04-09 20:57:00 +02:00
|
|
|
};
|
2013-10-06 21:36:18 +02:00
|
|
|
}
|