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

authored by

Sandro and committed by
GitHub
4e3a8445 7dc80389

+38 -13
+34 -12
pkgs/applications/audio/mpg123/default.nix
··· 1 - { lib, stdenv 1 + { lib 2 + , stdenv 2 3 , fetchurl 3 4 , makeWrapper 5 + , pkg-config 6 + , perl 7 + , withAlsa ? stdenv.hostPlatform.isLinux 4 8 , alsa-lib 5 - , perl 6 - , withConplay ? !stdenv.targetPlatform.isWindows 9 + , withPulse ? stdenv.hostPlatform.isLinux 10 + , libpulseaudio 11 + , withCoreAudio ? stdenv.hostPlatform.isDarwin 12 + , AudioUnit 13 + , AudioToolbox 14 + , withJack ? stdenv.hostPlatform.isUnix 15 + , jack 16 + , withConplay ? !stdenv.hostPlatform.isWindows 7 17 }: 8 18 9 19 stdenv.mkDerivation rec { 10 20 pname = "mpg123"; 11 - version = "1.26.5"; 21 + version = "1.28.2"; 12 22 13 23 src = fetchurl { 14 24 url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2"; 15 - sha256 = "sha256-UCqX4Nk1vn432YczgCHY8wG641wohPKoPVnEtSRm7wY="; 25 + sha256 = "006v44nz4nkpgvxz1k2vbbrfpa2m47hyydscs0wf3iysiyvd9vvy"; 16 26 }; 17 27 18 28 outputs = [ "out" ] ++ lib.optionals withConplay [ "conplay" ]; 19 29 20 - nativeBuildInputs = lib.optionals withConplay [ makeWrapper ]; 30 + nativeBuildInputs = lib.optionals withConplay [ makeWrapper ] 31 + ++ lib.optionals (withPulse || withJack) [ pkg-config ]; 21 32 22 33 buildInputs = lib.optionals withConplay [ perl ] 23 - ++ lib.optionals (!stdenv.isDarwin && !stdenv.targetPlatform.isWindows) [ alsa-lib ]; 34 + ++ lib.optionals withAlsa [ alsa-lib ] 35 + ++ lib.optionals withPulse [ libpulseaudio ] 36 + ++ lib.optionals withCoreAudio [ AudioUnit AudioToolbox ] 37 + ++ lib.optionals withJack [ jack ]; 38 + 39 + configureFlags = [ 40 + "--with-audio=${lib.strings.concatStringsSep "," ( 41 + lib.optional withJack "jack" 42 + ++ lib.optional withPulse "pulse" 43 + ++ lib.optional withAlsa "alsa" 44 + ++ lib.optional withCoreAudio "coreaudio" 45 + ++ [ "dummy" ] 46 + )}" 47 + ] ++ lib.optional (stdenv.hostPlatform ? mpg123) "--with-cpu=${stdenv.hostPlatform.mpg123.cpu}"; 24 48 25 - configureFlags = lib.optional 26 - (stdenv.hostPlatform ? mpg123) 27 - "--with-cpu=${stdenv.hostPlatform.mpg123.cpu}"; 49 + enableParallelBuilding = true; 28 50 29 51 postInstall = lib.optionalString withConplay '' 30 52 mkdir -p $conplay/bin ··· 43 65 meta = with lib; { 44 66 description = "Fast console MPEG Audio Player and decoder library"; 45 67 homepage = "https://mpg123.org"; 46 - license = licenses.lgpl21; 47 - maintainers = [ maintainers.ftrvxmtrx ]; 68 + license = licenses.lgpl21Only; 69 + maintainers = with maintainers; [ ftrvxmtrx ]; 48 70 platforms = platforms.all; 49 71 }; 50 72 }
+4 -1
pkgs/top-level/all-packages.nix
··· 26086 26086 26087 26087 mpc123 = callPackage ../applications/audio/mpc123 { }; 26088 26088 26089 - mpg123 = callPackage ../applications/audio/mpg123 { }; 26089 + mpg123 = callPackage ../applications/audio/mpg123 { 26090 + inherit (darwin.apple_sdk.frameworks) AudioUnit AudioToolbox; 26091 + jack = libjack2; 26092 + }; 26090 26093 26091 26094 mpg321 = callPackage ../applications/audio/mpg321 { }; 26092 26095