x-plane: init ortho4XPWrapper

master
Michael Raitza 2022-06-12 20:03:18 +02:00
parent 1e4348a775
commit 7fe59dee18
2 changed files with 13 additions and 1 deletions

View File

@ -9,7 +9,7 @@ let
xPlaneEnv = callPackage ./x-plane { xplanePathStr = "/home/games/xplane";
addons = [ headshake beautifulRoads samBasic samGlobalTrees flyWithLua vividSky airportEnvHD betterLights extendedNightLights toLissA321 ]; };
xPlaneSDK = callPackage ./x-plane/sdk.nix {};
ortho4xp = callPackage ./ortho4xp.nix {};
ortho4xp = callPackage ./x-plane/ortho4XPWrapper.nix { orthoPathStr = "/home/games/ortho4xp"; };
airportEnvHD = callPackage ./x-plane/airport-env-hd.nix {};
beautifulRoads = callPackage ./x-plane/beautiful-roads.nix {};

View File

@ -0,0 +1,12 @@
{ writeScriptBin, lib, python3, nvidia-texture-tools, p7zip, gdal, freeglut
, orthoPathStr }:
let
myPy = (python3.withPackages (ps: with ps; [
requests pyproj numpy gdal shapely Rtree pillow tkinter ]));
in writeScriptBin "ortho4XP" ''
: ''${ORTHOPATH:=${orthoPathStr}}
PATH="${lib.makeBinPath [ myPy nvidia-texture-tools p7zip gdal freeglut ]}:$PATH"
export ORTHOPATH PATH
cd "$ORTHOPATH"
exec python Ortho4XP_*.py "$@"
''