x-plane fix plugins; add toLissA321

master
Michael Raitza 2020-11-28 20:42:36 +01:00 committed by Michael Raitza
parent 4104ab089b
commit 8363410b8b
4 changed files with 34 additions and 4 deletions

View File

@ -7,7 +7,7 @@ let
callPackage = super.lib.callPackageWith self; callPackage = super.lib.callPackageWith self;
_self = { _self = {
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 ]; }; addons = [ headshake beautifulRoads samBasic samGlobalTrees flyWithLua vividSky airportEnvHD betterLights extendedNightLights toLissA321 ]; };
xPlaneSDK = callPackage ./x-plane/sdk.nix {}; xPlaneSDK = callPackage ./x-plane/sdk.nix {};
airportEnvHD = callPackage ./x-plane/airport-env-hd.nix {}; airportEnvHD = callPackage ./x-plane/airport-env-hd.nix {};
@ -20,6 +20,7 @@ let
samSuite = callPackage ./x-plane/sam-suite {}; samSuite = callPackage ./x-plane/sam-suite {};
samBasic = callPackage ./x-plane/sam-suite/sam-basic.nix {}; samBasic = callPackage ./x-plane/sam-suite/sam-basic.nix {};
samGlobalTrees = callPackage ./x-plane/sam-suite/global-trees.nix {}; samGlobalTrees = callPackage ./x-plane/sam-suite/global-trees.nix {};
toLissA321 = callPackage ./x-plane/toliss-A321.nix {};
vividSky = callPackage ./x-plane/vivid-sky.nix {}; vividSky = callPackage ./x-plane/vivid-sky.nix {};
# flightgear = libsForQt5.callPackage ./flightgear { }; # flightgear = libsForQt5.callPackage ./flightgear { };

View File

@ -80,7 +80,7 @@ let
''))) uniqueAddons)); ''))) uniqueAddons));
revertScript = writeScript "x-plane-addons-revert" '' revertScript = writeScript "x-plane-addons-revert" ''
#!${stdenv.shell} #!/bin/sh
set -e set -e
: ''${XPLANEPATH:=${xplanePathStr}} : ''${XPLANEPATH:=${xplanePathStr}}
printf "Reverting modifications made to %s\n" "$XPLANEPATH"; printf "Reverting modifications made to %s\n" "$XPLANEPATH";
@ -104,7 +104,7 @@ in buildFHSUserEnv rec {
# Also add GAppsWrapper environment stuff such that binaries see the GTK theme... # Also add GAppsWrapper environment stuff such that binaries see the GTK theme...
targetPkgs = pkgs: (with pkgs; [ unzip atk gdk_pixbuf cairo pango mesa_glu libGL openalSoft gtk2 glib dbus pulseaudio ] ++ targetPkgs = pkgs: (with pkgs; [ unzip atk gdk_pixbuf cairo pango mesa_glu libGL openalSoft gtk2 glib dbus pulseaudio vulkan-tools vulkan-loader ] ++
(with xorg; [ libX11 libXext libXrandr libXcursor libXinerama ]) ++ (with xorg; [ libX11 libXext libXrandr libXcursor libXinerama ]) ++
# For reality expansion pack # For reality expansion pack
[ stdenv.cc.cc.lib curl openssl ] ++ [ stdenv.cc.cc.lib curl openssl ] ++

29
x-plane/toliss-A321.nix Normal file
View File

@ -0,0 +1,29 @@
{ stdenv, mkXPlaneAddon }:
mkXPlaneAddon rec {
pname = "toliss-A321";
version = "1.1";
fname = "ToLissA321_V1p1.zip";
sha256 = "027bb9qysjjdvrgkni08grrk1agppb6l653jqqnyfz1f30bc1xkq";
forumlink = "https://forums.x-plane.org/index.php?/forums/forum/534-airbus-a321/";
buildCommand = ''
mkdir -p $out
cd $out
unzip $src
'';
passthru = {
build = ''
ln -s $ADDONPATH $out/xplane-extra/ToLiss-A321
'';
prepare = ''
mkdir -p "$XPLANEPATH/Aircraft/ToLiss/ToLiss_A321"
for f in /xplane-extra/ToLiss-A321/*/*; do
cp -r --no-preserve=mode "$f" "$XPLANEPATH/Aircraft/ToLiss/ToLiss_A321"
done
'';
revert = ''
rm -fr "$XPLANEPATH/Aircraft/ToLiss/ToLiss_A321"
rmdir "$XPLANEPATH/Aircraft/ToLiss" || true
'';
};
}

View File

@ -36,7 +36,7 @@ mkXPlaneAddon rec {
false false
fi fi
done done
for f in "$XPLANEPATH/Resources/plugins/FlyWithLua/Scipts/vivid_sky.lua" "$XPLANEPATH/Resources/plugins/FlyWithLua/Scipts/vivid_water.lua" ; do for f in "$XPLANEPATH/Resources/plugins/FlyWithLua/Scripts/vivid_sky.lua" "$XPLANEPATH/Resources/plugins/FlyWithLua/Scripts/vivid_water.lua" ; do
if [ -L "$f" ]; then if [ -L "$f" ]; then
rm "$f" rm "$f"
else else