X-Plane addon: Add X-World Vegetation library

master
Michael Raitza 2022-10-09 14:03:04 +02:00
parent a930a85f55
commit dc8c79519a
2 changed files with 45 additions and 1 deletions

View File

@ -9,10 +9,11 @@ let
xPlaneEnv = callPackage ./x-plane { xplanePathStr = "/home/games/xplane"; xPlaneEnv = callPackage ./x-plane { xplanePathStr = "/home/games/xplane";
addons = [ headshake beautifulRoads samBasic samGlobalTrees flyWithLua vividSky airportEnvHD betterLights extendedNightLights toLissA321 ]; }; addons = [ headshake beautifulRoads samBasic samGlobalTrees flyWithLua vividSky airportEnvHD betterLights extendedNightLights toLissA321 ]; };
xPlane12Env = callPackage ./x-plane { xplanePathStr = "/home/games/xplane12"; name = "x-plane12-env"; xPlane12Env = callPackage ./x-plane { xplanePathStr = "/home/games/xplane12"; name = "x-plane12-env";
addons = [ ]; }; addons = [ x-world-vegetation ]; };
xPlaneSDK = callPackage ./x-plane/sdk.nix {}; xPlaneSDK = callPackage ./x-plane/sdk.nix {};
ortho4xp = callPackage ./x-plane/ortho4XPWrapper.nix { orthoPathStr = "/home/games/ortho4xp"; }; ortho4xp = callPackage ./x-plane/ortho4XPWrapper.nix { orthoPathStr = "/home/games/ortho4xp"; };
# X-Plane 11
airportEnvHD = callPackage ./x-plane/airport-env-hd.nix {}; airportEnvHD = callPackage ./x-plane/airport-env-hd.nix {};
beautifulRoads = callPackage ./x-plane/beautiful-roads.nix {}; beautifulRoads = callPackage ./x-plane/beautiful-roads.nix {};
betterLights = callPackage ./x-plane/better-lights.nix {}; betterLights = callPackage ./x-plane/better-lights.nix {};
@ -26,6 +27,9 @@ let
toLissA321 = callPackage ./x-plane/toliss-A321.nix {}; toLissA321 = callPackage ./x-plane/toliss-A321.nix {};
vividSky = callPackage ./x-plane/vivid-sky.nix {}; vividSky = callPackage ./x-plane/vivid-sky.nix {};
# X-Plane 12
x-world-vegetation = callPackage ./x-plane/simHeaven/x-world-vegetation.nix {};
pdfchain = callPackage ./pdfchain { }; pdfchain = callPackage ./pdfchain { };
prism = callPackage ./prism.nix {}; prism = callPackage ./prism.nix {};
lp_solve_java = callPackage ./lp_solve_java.nix {}; lp_solve_java = callPackage ./lp_solve_java.nix {};

View File

@ -0,0 +1,40 @@
{ stdenv
, lib
, mkXPlaneAddon
}:
mkXPlaneAddon {
pname = "x-world-vegetation";
version = "1.0";
fname = "simHeaven_X-World_Vegetation_Library.7z";
sha256 = "sha256-NxiLAmnz2YHrc/MyGfExEzCdl/yvURNSWMGcIQ8Csnw=";
forumlink = "https://simheaven.com/simdownloads/x-world-vegetation-library/";
buildCommand = ''
mkdir -p "$out/Custom Scenery/"
7z x $src
cp -r simHeaven* "$out/Custom Scenery"
'';
passthru = let
dirName="simHeaven_X-World_Vegetation_Library";
addonPath = "$XPLANEPATH/Custom Scenery/${dirName}";
in {
build = ''
ln -s $ADDONPATH $out/xplane-extra/x-world-vegetation
'';
prepare = ''
mkdir -p "${addonPath}"
for f in "/xplane-extra/x-world-vegetation/Custom Scenery/${dirName}/"* ; do
ln -s "$f" "${addonPath}/$(basename "$f")"
done
ln -s "$XPLANEPATH/Resources/default scenery/1200 forests" "${addonPath}/1200 forests"
'';
revert = ''
if [ -d "${addonPath}" ]; then
rm -r "${addonPath}"
else
false
fi
'';
};
}