From 0526aaa8a27a15a4a9bc52a2e2d2e54f438f8a55 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Sat, 9 Apr 2011 18:57:00 +0000 Subject: [PATCH] Adding FlightGear svn path=/nixpkgs/trunk/; revision=26770 --- pkgs/games/flightgear/default.nix | 59 +++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 61 insertions(+) create mode 100644 pkgs/games/flightgear/default.nix diff --git a/pkgs/games/flightgear/default.nix b/pkgs/games/flightgear/default.nix new file mode 100644 index 000000000000..a7d906ed9b8e --- /dev/null +++ b/pkgs/games/flightgear/default.nix @@ -0,0 +1,59 @@ +x@{builderDefsPackage + , freeglut, freealut, mesa, libICE, libjpeg, openal, openscenegraph, plib + , libSM, libunwind, libX11, xproto, libXext, xextproto, libXi, inputproto + , libXmu, libXt, simgear, zlib, boost + , ...}: +builderDefsPackage +(a : +let + helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ + []; + + buildInputs = map (n: builtins.getAttr n x) + (builtins.attrNames (builtins.removeAttrs x helperArgNames)); + sourceInfo = rec { + baseName="FlightGear"; + version="2.0.0"; + name="${baseName}-${version}"; + extension="tar.gz"; + url="http://ftp.linux.kiev.ua/pub/fgfs/Source/${name}.${extension}"; + hash="17h7ns955xkd0cakfk22aym0id65rd8kylcamkmycbgnnhs4b1wg"; + }; +in +rec { + src = a.fetchurl { + url = sourceInfo.url; + sha256 = sourceInfo.hash; + }; + + datasrc = a.fetchurl { + url = "http://ftp.igh.cnrs.fr/pub/flightgear/ftp/Shared/FlightGear-data-2.0.0.tar.bz2"; + sha256 = "0kvmvh5qycbpdjx12l20cbhljwimmcgww2dg4lkc2sky0kg14ic1"; + }; + + inherit (sourceInfo) name version; + inherit buildInputs; + + /* doConfigure should be removed if not needed */ + phaseNames = ["doConfigure" "doMakeInstall" "deployData"]; + + deployData = a.fullDepEntry '' + ensureDir "$out/share/FlightGear" + cd "$out/share/FlightGear" + tar xvf ${datasrc} + '' ["minInit" "defEnsureDir"]; + + meta = { + description = "A flight simulator"; + maintainers = with a.lib.maintainers; + [ + raskin + ]; + platforms = with a.lib.platforms; + linux; + license = a.lib.licenses.gpl2; + }; + passthru = { + }; +}) x + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fb6fcb194c7c..877e99e9feeb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7111,6 +7111,8 @@ let }); */ + flightgear = callPackage ../games/flightgear {}; + freedink = callPackage ../games/freedink { }; fsg = callPackage ../games/fsg {