3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #134349 from OPNA2608/fix/mpg123-darwin-sound/21.11

This commit is contained in:
Sandro 2021-08-21 21:01:50 +02:00 committed by GitHub
commit 4e3a844577
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 13 deletions

View file

@ -1,30 +1,52 @@
{ lib, stdenv
{ lib
, stdenv
, fetchurl
, makeWrapper
, alsa-lib
, pkg-config
, perl
, withConplay ? !stdenv.targetPlatform.isWindows
, withAlsa ? stdenv.hostPlatform.isLinux
, alsa-lib
, withPulse ? stdenv.hostPlatform.isLinux
, libpulseaudio
, withCoreAudio ? stdenv.hostPlatform.isDarwin
, AudioUnit
, AudioToolbox
, withJack ? stdenv.hostPlatform.isUnix
, jack
, withConplay ? !stdenv.hostPlatform.isWindows
}:
stdenv.mkDerivation rec {
pname = "mpg123";
version = "1.26.5";
version = "1.28.2";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2";
sha256 = "sha256-UCqX4Nk1vn432YczgCHY8wG641wohPKoPVnEtSRm7wY=";
sha256 = "006v44nz4nkpgvxz1k2vbbrfpa2m47hyydscs0wf3iysiyvd9vvy";
};
outputs = [ "out" ] ++ lib.optionals withConplay [ "conplay" ];
nativeBuildInputs = lib.optionals withConplay [ makeWrapper ];
nativeBuildInputs = lib.optionals withConplay [ makeWrapper ]
++ lib.optionals (withPulse || withJack) [ pkg-config ];
buildInputs = lib.optionals withConplay [ perl ]
++ lib.optionals (!stdenv.isDarwin && !stdenv.targetPlatform.isWindows) [ alsa-lib ];
++ lib.optionals withAlsa [ alsa-lib ]
++ lib.optionals withPulse [ libpulseaudio ]
++ lib.optionals withCoreAudio [ AudioUnit AudioToolbox ]
++ lib.optionals withJack [ jack ];
configureFlags = lib.optional
(stdenv.hostPlatform ? mpg123)
"--with-cpu=${stdenv.hostPlatform.mpg123.cpu}";
configureFlags = [
"--with-audio=${lib.strings.concatStringsSep "," (
lib.optional withJack "jack"
++ lib.optional withPulse "pulse"
++ lib.optional withAlsa "alsa"
++ lib.optional withCoreAudio "coreaudio"
++ [ "dummy" ]
)}"
] ++ lib.optional (stdenv.hostPlatform ? mpg123) "--with-cpu=${stdenv.hostPlatform.mpg123.cpu}";
enableParallelBuilding = true;
postInstall = lib.optionalString withConplay ''
mkdir -p $conplay/bin
@ -43,8 +65,8 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Fast console MPEG Audio Player and decoder library";
homepage = "https://mpg123.org";
license = licenses.lgpl21;
maintainers = [ maintainers.ftrvxmtrx ];
license = licenses.lgpl21Only;
maintainers = with maintainers; [ ftrvxmtrx ];
platforms = platforms.all;
};
}

View file

@ -26086,7 +26086,10 @@ with pkgs;
mpc123 = callPackage ../applications/audio/mpc123 { };
mpg123 = callPackage ../applications/audio/mpg123 { };
mpg123 = callPackage ../applications/audio/mpg123 {
inherit (darwin.apple_sdk.frameworks) AudioUnit AudioToolbox;
jack = libjack2;
};
mpg321 = callPackage ../applications/audio/mpg321 { };