diff --git a/default.nix b/default.nix index 5f0d6a5..d55f0cf 100644 --- a/default.nix +++ b/default.nix @@ -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 {}; diff --git a/x-plane/ortho4XPWrapper.nix b/x-plane/ortho4XPWrapper.nix new file mode 100644 index 0000000..183a9a9 --- /dev/null +++ b/x-plane/ortho4XPWrapper.nix @@ -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 "$@" +''