forked from mirrors/nixpkgs
fix sound in minecraft for pulseaudio users
This commit is contained in:
parent
5c0816567d
commit
6c7786074f
|
@ -1,5 +1,5 @@
|
|||
{ stdenv, fetchurl, jre, libX11, libXext, libXcursor, libXrandr, libXxf86vm
|
||||
, mesa, openal, alsaOss }:
|
||||
, mesa, openal, alsaOss, pulseaudioSupport ? false, pulseaudio }:
|
||||
|
||||
assert jre ? architecture;
|
||||
|
||||
|
@ -23,7 +23,8 @@ stdenv.mkDerivation {
|
|||
|
||||
# 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/
|
||||
${alsaOss}/bin/aoss ${jre}/bin/java -jar $out/minecraft.jar
|
||||
${if pulseaudioSupport then "${pulseaudio}/bin/padsp" else "${alsaOss}/bin/aoss" } \
|
||||
${jre}/bin/java -jar $out/minecraft.jar
|
||||
EOF
|
||||
|
||||
chmod +x $out/bin/minecraft
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
, bluez, sbc, udev, libcap, json_c
|
||||
, jackaudioSupport ? false, jack2 ? null
|
||||
, x11Support ? false, xlibs
|
||||
, useSystemd ? false, systemd ? null }:
|
||||
, useSystemd ? false, systemd ? null
|
||||
, ossWrapper ? false }:
|
||||
|
||||
assert jackaudioSupport -> jack2 != null;
|
||||
|
||||
|
@ -49,11 +50,13 @@ stdenv.mkDerivation rec {
|
|||
"--disable-solaris"
|
||||
"--disable-jack"
|
||||
"--disable-oss-output"
|
||||
"--disable-oss-wrapper"
|
||||
] ++ stdenv.lib.optional (!ossWrapper) "--disable-oss-wrapper" ++
|
||||
[
|
||||
"--localstatedir=/var"
|
||||
"--sysconfdir=/etc"
|
||||
"--with-access-group=audio"
|
||||
] ++ stdenv.lib.optional jackaudioSupport "--enable-jack"
|
||||
]
|
||||
++ stdenv.lib.optional jackaudioSupport "--enable-jack"
|
||||
++ stdenv.lib.optional stdenv.isDarwin "--with-mac-sysroot=/";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
|
|
@ -1628,7 +1628,10 @@ let
|
|||
|
||||
mfoc = callPackage ../tools/security/mfoc { };
|
||||
|
||||
minecraft = callPackage ../games/minecraft { };
|
||||
minecraft = callPackage ../games/minecraft {
|
||||
pulseaudioSupport = config.pulseaudio or true;
|
||||
pulseaudio = pulseaudio.override { ossWrapper = true; };
|
||||
};
|
||||
|
||||
minecraft-server = callPackage ../games/minecraft-server { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue