parent
badc12bacb
commit
d353c2b134
@ -1,32 +0,0 @@ |
||||
{ pkgs? import <nixpkgs> {}, xplanePathStr }: |
||||
|
||||
let |
||||
runScript = pkgs.writeScript "x-plane-script" '' |
||||
#!${pkgs.stdenv.shell} |
||||
sys=${pkgs.stdenv.targetPlatform.system} |
||||
sys=''${sys%-linux} |
||||
: ''${XPLANEPATH:=${xplanePathStr}} |
||||
case $1 in |
||||
X-Plane) exec "''${XPLANEPATH}/X-Plane-$sys" ;; |
||||
Airfoil*) exec "''${XPLANEPATH}/Airfoil Maker-$sys" ;; |
||||
Plane*) exec "''${XPLANEPATH}/Plane Maker-$sys" ;; |
||||
''') exec "''${XPLANEPATH}/X-Plane-$sys" ;; |
||||
SHELL) exec "bash" ;; |
||||
*) exec "''${XPLANEPATH}/$1" ;; |
||||
esac |
||||
''; |
||||
in pkgs.buildFHSUserEnv rec { |
||||
name = "x-plane-env"; |
||||
|
||||
# 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 ] ++ |
||||
(with xorg; [ libX11 libXext libXrandr libXcursor libXinerama ])); |
||||
extraBuildCommands = '' |
||||
chmod u+w $out/etc |
||||
mkdir $out/etc/openal |
||||
chmod u-w $out/etc |
||||
echo "drivers=pulse" > $out/etc/openal/alsoft.conf |
||||
''; |
||||
inherit runScript; |
||||
} |
Loading…
Reference in new issue