nixpkgs/pkgs/games/flightgear/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
1.8 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, wrapQtAppsHook
, libglut, freealut, libGLU, libGL, libICE, libjpeg, openal, openscenegraph, plib
, libSM, libunwind, libX11, xorgproto, libXext, libXi
, libXmu, libXt, simgear, zlib, boost, cmake, libpng, udev, fltk13, apr
, makeDesktopItem, qtbase, qtdeclarative, glew, curl
}:
2016-12-24 21:57:25 +00:00
let
2023-11-07 06:25:29 +00:00
version = "2020.3.19";
2019-08-06 20:06:40 +00:00
shortVersion = builtins.substring 0 6 version;
2016-12-24 21:57:25 +00:00
data = stdenv.mkDerivation rec {
2020-07-01 12:57:03 +00:00
pname = "flightgear-data";
2019-08-13 21:52:01 +00:00
inherit version;
2016-12-24 21:57:25 +00:00
src = fetchurl {
2021-04-17 23:04:38 +00:00
url = "mirror://sourceforge/flightgear/release-${shortVersion}/FlightGear-${version}-data.txz";
2023-11-07 06:25:29 +00:00
sha256 = "sha256-863EnNBU+rYTdxHwMV6HbBu99lO6H3mKGuyumm6YR5U=";
2016-12-24 21:57:25 +00:00
};
2021-08-03 08:50:40 +00:00
dontUnpack = true;
2016-12-24 21:57:25 +00:00
installPhase = ''
mkdir -p "$out/share/FlightGear"
tar xf "${src}" -C "$out/share/FlightGear/" --strip-components=1
'';
};
in
stdenv.mkDerivation rec {
2019-08-06 20:06:40 +00:00
pname = "flightgear";
2023-05-15 05:57:52 +00:00
# inheriting data for `nix-prefetch-url -A pkgs.flightgear.data.src`
inherit version data;
src = fetchurl {
2019-08-06 20:06:40 +00:00
url = "mirror://sourceforge/flightgear/release-${shortVersion}/${pname}-${version}.tar.bz2";
2023-11-07 06:25:29 +00:00
sha256 = "sha256-Fn0I3pzA9yIYs3myPNflbH9u4Y19VZUS2lGjvWfzjm4=";
};
2019-08-06 20:06:40 +00:00
nativeBuildInputs = [ cmake wrapQtAppsHook ];
buildInputs = [
libglut freealut libGLU libGL libICE libjpeg openal openscenegraph plib
libSM libunwind libX11 xorgproto libXext libXi
2019-08-06 20:06:40 +00:00
libXmu libXt simgear zlib boost libpng udev fltk13 apr qtbase
glew qtdeclarative curl
];
qtWrapperArgs = [
2019-08-06 20:06:40 +00:00
"--set FG_ROOT ${data}/share/FlightGear"
];
meta = with lib; {
description = "Flight simulator";
maintainers = with maintainers; [ raskin ];
platforms = platforms.linux;
hydraPlatforms = []; # disabled from hydra because it's so big
2024-07-03 09:37:36 +00:00
license = licenses.gpl2Plus;
2023-11-07 06:25:29 +00:00
mainProgram = "fgfs";
};
}