mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
mpg321: add pkg option to set libao default audio driver
Tested manually with "alsa" and "pulse" drivers.
This commit is contained in:
parent
a1f7aa1ceb
commit
948934864d
1 changed files with 9 additions and 4 deletions
|
@ -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}";
|
||||
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue