From af71fbc6f1ee86dfe40d8a92eb4fd4a21414e3e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carles=20Pag=C3=A8s?= Date: Fri, 24 Jul 2015 00:26:48 +0200 Subject: [PATCH] minecraft: fix wrapper Adding jre lib path seems no longer needed, and so does padsp. --- pkgs/games/minecraft/default.nix | 11 ++++++----- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/games/minecraft/default.nix b/pkgs/games/minecraft/default.nix index 9a19366a074c..218a84d591d3 100644 --- a/pkgs/games/minecraft/default.nix +++ b/pkgs/games/minecraft/default.nix @@ -1,10 +1,11 @@ { stdenv, fetchurl, jre, libX11, libXext, libXcursor, libXrandr, libXxf86vm -, mesa, openal, alsaOss, pulseaudioSupport ? false, libpulseaudio }: +, mesa, openal +, useAlsa ? false, alsaOss ? null }: -assert jre ? architecture; +assert useAlsa -> alsaOss != null; stdenv.mkDerivation { - name = "minecraft-2013.07.01"; + name = "minecraft-2015.07.24"; src = fetchurl { url = "https://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar"; @@ -22,8 +23,8 @@ stdenv.mkDerivation { #!${stdenv.shell} # wrapper for minecraft - export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${jre}/lib/${jre.architecture}/:${libX11}/lib/:${libXext}/lib/:${libXcursor}/lib/:${libXrandr}/lib/:${libXxf86vm}/lib/:${mesa}/lib/:${openal}/lib/ - ${if pulseaudioSupport then "${libpulseaudio}/bin/padsp" else "${alsaOss}/bin/aoss" } \ + export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${libX11}/lib/:${libXext}/lib/:${libXcursor}/lib/:${libXrandr}/lib/:${libXxf86vm}/lib/:${mesa}/lib/:${openal}/lib/ + ${if useAlsa then "${alsaOss}/bin/aoss" else "" } \ ${jre}/bin/java -jar $out/minecraft.jar EOF diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d1924857bc53..0b5d933c96d5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2203,7 +2203,7 @@ let mfoc = callPackage ../tools/security/mfoc { }; minecraft = callPackage ../games/minecraft { - pulseaudioSupport = config.pulseaudio or true; + useAlsa = config.minecraft.alsa or false; }; minecraft-server = callPackage ../games/minecraft-server { };