git.iko.soy/typeable/nixpkgs
on master help sign in
mpg321: add pkg option to set libao default audio driver

Tested manually with "alsa" and "pulse" drivers.

commit948934864dbf063e742456aa079aa65c0cd7321b authorProfpatsch <mail@profpatsch.de> dateThu 26 Oct 2017, 02:33 (9 years ago) parenta1f7aa1
1 file changed+9−4
pkgs/applications/audio/mpg321/default.nix+9−4
pkgs/applications/audio/mpg321/default.nix+9−4
@@ -1,4 +1,8 @@
1−{stdenv, fetchurl, libao, libmad, libid3tag, zlib, alsaLib}:
1+{stdenv, fetchurl, libao, libmad, libid3tag, zlib, alsaLib
2+# Specify default libao output plugin to use (e.g. "alsa", "pulse" …).
3+# If null, it will use the libao system default.
4+, defaultAudio ? null
5+}:
26
37stdenv.mkDerivation rec {
48 name = "mpg321-${version}";
@@ -11,9 +15,10 @@ stdenv.mkDerivation rec {
1115
1216 hardeningDisable = [ "format" ];
1317
14− configureFlags = [
15− ("--enable-alsa=" + (if stdenv.isLinux then "yes" else "no"))
16− ];
18+ configureFlags =
19+ [ ("--enable-alsa=" + (if stdenv.isLinux then "yes" else "no")) ]
20+ ++ (stdenv.lib.optional (defaultAudio != null)
21+ "--with-default-audio=${defaultAudio}");
1722
1823 buildInputs = [libao libid3tag libmad zlib]
1924 ++ stdenv.lib.optional stdenv.isLinux alsaLib;