Skip to content

Commit

Permalink
mpg321: add pkg option to set libao default audio driver
Browse files Browse the repository at this point in the history
Tested manually with "alsa" and "pulse" drivers.
  • Loading branch information
Profpatsch authored and rycee committed Oct 26, 2017
1 parent a1f7aa1 commit 9489348
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions pkgs/applications/audio/mpg321/default.nix
@@ -1,4 +1,8 @@
{stdenv, fetchurl, libao, libmad, libid3tag, zlib, alsaLib}:
{stdenv, fetchurl, libao, libmad, libid3tag, zlib, alsaLib
# Specify default libao output plugin to use (e.g. "alsa", "pulse" …).
# If null, it will use the libao system default.
, defaultAudio ? null
}:

stdenv.mkDerivation rec {
name = "mpg321-${version}";
Expand All @@ -11,9 +15,10 @@ stdenv.mkDerivation rec {

hardeningDisable = [ "format" ];

configureFlags = [
("--enable-alsa=" + (if stdenv.isLinux then "yes" else "no"))
];
configureFlags =
[ ("--enable-alsa=" + (if stdenv.isLinux then "yes" else "no")) ]
++ (stdenv.lib.optional (defaultAudio != null)
"--with-default-audio=${defaultAudio}");

buildInputs = [libao libid3tag libmad zlib]
++ stdenv.lib.optional stdenv.isLinux alsaLib;
Expand Down

0 comments on commit 9489348

Please sign in to comment.