1a062d1456
The current FlightGear expression doesn't work: bash$ nix-build -A flightgear /nix/store/3c47sibzb9h1vhnn0gnh692hkpjc5p5v-flightgear-2.10.0 bash$ ./result/bin/fgfs ERROR: The path '/nix/store/3c47sibzb9h1vhnn0gnh692hkpjc5p5v-flightgear-2.10.0/lib/FlightGear' does not exist in the file system. Base package check failed: Version [none] found at: /nix/store/3c47sibzb9h1vhnn0gnh692hkpjc5p5v-flightgear-2.10.0/lib/FlightGear Version 2.10.0 is required. Please upgrade/downgrade base package and set the path to your fgdata with --fg-root=path_to_your_fgdata We could probably make the 2.10.0 version run, but I had already upgraded it to 2.12.0 before I made it work. It seems only the data dir configuration was wrong/missing: FG_DATA_DIR="$out/share/FlightGear/". Simgear must be in version sync with flightgear, hence the upgrade. Most of the diff is because I rewrote the flightgear expression to what I think is the "new style". I wanted to add a preConfigure phase but didn't understand why this expression had custom phases. So I just rewrote the whole thing to something I consider more readable.
51 lines
1.3 KiB
Nix
51 lines
1.3 KiB
Nix
x@{builderDefsPackage
|
|
, plib, freeglut, xproto, libX11, libXext, xextproto, libXi , inputproto
|
|
, libICE, libSM, libXt, libXmu, mesa, boost, zlib, libjpeg , freealut
|
|
, openscenegraph, openal, expat, cmake, apr
|
|
, ...}:
|
|
builderDefsPackage
|
|
(a :
|
|
let
|
|
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
|
[];
|
|
|
|
buildInputs = map (n: builtins.getAttr n x)
|
|
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
|
sourceInfo = rec {
|
|
baseName="simgear";
|
|
version="2.12.0";
|
|
name="${baseName}-${version}";
|
|
extension="tar.bz2";
|
|
url="http://mirrors.ibiblio.org/pub/mirrors/simgear/ftp/Source/${name}.${extension}";
|
|
hash="0spl6afk8rm96ss4lh7zy5561m5m2qgwsnqjyp35jr1gyyrc944f";
|
|
};
|
|
in
|
|
rec {
|
|
src = a.fetchurl {
|
|
url = sourceInfo.url;
|
|
sha256 = sourceInfo.hash;
|
|
};
|
|
|
|
inherit (sourceInfo) name version;
|
|
inherit buildInputs;
|
|
|
|
/* doConfigure should be removed if not needed */
|
|
phaseNames = [ "doCmake" "doMakeInstall" ];
|
|
|
|
meta = {
|
|
description = "Simulation construction toolkit";
|
|
maintainers = with a.lib.maintainers;
|
|
[
|
|
raskin
|
|
];
|
|
platforms = with a.lib.platforms;
|
|
linux;
|
|
license = a.lib.licenses.lgpl2;
|
|
};
|
|
passthru = {
|
|
updateInfo = {
|
|
downloadPage = "ftp://ftp.goflyflightgear.com/simgear/Source/";
|
|
};
|
|
};
|
|
}) x
|
|
|