1 { lib, stdenv, fetchurl, wrapQtAppsHook
2 , freeglut, freealut, libGLU, libGL, libICE, libjpeg, openal, openscenegraph, plib
3 , libSM, libunwind, libX11, xorgproto, libXext, libXi
4 , libXmu, libXt, simgear, zlib, boost, cmake, libpng, udev, fltk13, apr
5 , makeDesktopItem, qtbase, qtdeclarative, glew
10 shortVersion = builtins.substring 0 6 version;
11 data = stdenv.mkDerivation rec {
12 pname = "flightgear-data";
16 url = "mirror://sourceforge/flightgear/release-${shortVersion}/FlightGear-${version}-data.txz";
17 sha256 = "sha256-C3iUVA7IJQ77OdXcaBnSpDphMFjmFZmn0nozQvdxSJM=";
23 mkdir -p "$out/share/FlightGear"
24 tar xf "${src}" -C "$out/share/FlightGear/" --strip-components=1
28 stdenv.mkDerivation rec {
30 # inheriting data for `nix-prefetch-url -A pkgs.flightgear.data.src`
34 url = "mirror://sourceforge/flightgear/release-${shortVersion}/${pname}-${version}.tar.bz2";
35 sha256 = "sha256-Zhq/r0davIz9G6tXVZRp76ZivG0D9Y6Nl3OFAD/lqow=";
38 # Of all the files in the source and data archives, there doesn't seem to be
41 url = "https://wiki.flightgear.org/w/images/6/62/FlightGear_logo.png";
42 sha256 = "1ikz413jia55vfnmx8iwrlxvx8p16ggm81mbrj66wam3q7s2dm5p";
45 desktopItem = makeDesktopItem {
49 comment = "FlightGear Flight Simulator";
50 desktopName = "FlightGear";
51 genericName = "Flight simulator";
52 categories = [ "Game" "Simulation" ];
55 nativeBuildInputs = [ cmake wrapQtAppsHook ];
57 freeglut freealut libGLU libGL libICE libjpeg openal openscenegraph plib
58 libSM libunwind libX11 xorgproto libXext libXi
59 libXmu libXt simgear zlib boost libpng udev fltk13 apr qtbase
64 mkdir -p "$out/share/applications/"
65 cp "${desktopItem}"/share/applications/* "$out/share/applications/" #*/
69 "--set FG_ROOT ${data}/share/FlightGear"
73 description = "Flight simulator";
74 maintainers = with maintainers; [ raskin ];
75 platforms = platforms.linux;
76 hydraPlatforms = []; # disabled from hydra because it's so big
77 license = licenses.gpl2;