Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpg321: add pkg option to set libao default audio driver #30812

Closed
wants to merge 1 commit into from

Conversation

Profpatsch
Copy link
Member

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

  • Built on platform(s)
    • NixOS
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)

@Profpatsch Profpatsch requested a review from rycee October 26, 2017 00:36
@@ -12,6 +16,8 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ];

configureFlags = [
(stdenv.lib.optional (defaultAudio != null)
"--with-default-audio=${defaultAudio}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The optional function returns a list so I think this actually should be something like

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, huh, I have no idea how it worked then. It clearly did. Probably something bash interpreted correctly by chance.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it correctly sets the configure flag. I changed it to a correct list concatenation anyway.

Tested manually with "alsa" and "pulse" drivers.
@rycee
Copy link
Member

rycee commented Oct 26, 2017

I guess it works because toString [] == "", I think this list concatenation is more explicit and nicer :-)

Rebased to master in 9489348. Many thanks!

@rycee rycee closed this Oct 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants