Merge pull request #221184 from NixOS/sndfile-1.2.0
This commit is contained in:
commit
de80fd06c5
|
@ -3,7 +3,7 @@
|
|||
, fetchurl
|
||||
, makeWrapper
|
||||
, pkg-config
|
||||
, perl
|
||||
, libOnly ? false # whether to build only the library
|
||||
, withAlsa ? stdenv.hostPlatform.isLinux
|
||||
, alsa-lib
|
||||
, withPulse ? stdenv.hostPlatform.isLinux
|
||||
|
@ -14,29 +14,36 @@
|
|||
, withJack ? stdenv.hostPlatform.isUnix
|
||||
, jack
|
||||
, withConplay ? !stdenv.hostPlatform.isWindows
|
||||
, perl
|
||||
}:
|
||||
|
||||
assert withConplay -> !libOnly;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mpg123";
|
||||
pname = "${lib.optionalString libOnly "lib"}mpg123";
|
||||
version = "1.31.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2";
|
||||
url = "mirror://sourceforge/mpg123/mpg123-${version}.tar.bz2";
|
||||
sha256 = "sha256-sX8ikF4x9DtrQB399qce0Ru30Fb2jbRJ1wufmug5x94=";
|
||||
};
|
||||
|
||||
outputs = [ "out" ] ++ lib.optionals withConplay [ "conplay" ];
|
||||
outputs = [ "out" ] ++ lib.optional withConplay "conplay";
|
||||
|
||||
nativeBuildInputs = lib.optionals withConplay [ makeWrapper ]
|
||||
++ lib.optionals (withPulse || withJack) [ pkg-config ];
|
||||
nativeBuildInputs = lib.optionals (!libOnly) (
|
||||
lib.optionals withConplay [ makeWrapper ]
|
||||
++ lib.optionals (withPulse || withJack) [ pkg-config ]
|
||||
);
|
||||
|
||||
buildInputs = lib.optionals withConplay [ perl ]
|
||||
buildInputs = lib.optionals (!libOnly) (
|
||||
lib.optionals withConplay [ perl ]
|
||||
++ lib.optionals withAlsa [ alsa-lib ]
|
||||
++ lib.optionals withPulse [ libpulseaudio ]
|
||||
++ lib.optionals withCoreAudio [ AudioUnit AudioToolbox ]
|
||||
++ lib.optionals withJack [ jack ];
|
||||
++ lib.optionals withJack [ jack ]
|
||||
);
|
||||
|
||||
configureFlags = [
|
||||
configureFlags = lib.optionals (!libOnly) [
|
||||
"--with-audio=${lib.strings.concatStringsSep "," (
|
||||
lib.optional withJack "jack"
|
||||
++ lib.optional withPulse "pulse"
|
||||
|
|
|
@ -1,20 +1,22 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, autogen, flac, libogg, libopus, libvorbis, pkg-config, python3
|
||||
, Carbon, AudioToolbox
|
||||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, autogen, pkg-config, python3
|
||||
, flac, lame, libmpg123, libogg, libopus, libvorbis
|
||||
, alsa-lib, Carbon, AudioToolbox
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libsndfile";
|
||||
version = "1.1.0";
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-bhIXVSKuUnUzs5aaLDHt21RcnqekEpLU414sFtl2Lro=";
|
||||
hash = "sha256-zd0HDUzVYLyFjhIudBJQaKJUtYMjZeQRLALSkyD9tXU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook autogen pkg-config python3 ];
|
||||
buildInputs = [ flac libogg libopus libvorbis ]
|
||||
buildInputs = [ flac lame libmpg123 libogg libopus libvorbis ]
|
||||
++ lib.optionals stdenv.isLinux [ alsa-lib ]
|
||||
++ lib.optionals stdenv.isDarwin [ Carbon AudioToolbox ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
@ -34,6 +36,7 @@ stdenv.mkDerivation rec {
|
|||
meta = with lib; {
|
||||
description = "A C library for reading and writing files containing sampled sound";
|
||||
homepage = "https://libsndfile.github.io/libsndfile/";
|
||||
changelog = "https://github.com/libsndfile/libsndfile/releases/tag/${version}";
|
||||
license = licenses.lgpl2Plus;
|
||||
maintainers = with maintainers; [ lovek323 ];
|
||||
platforms = platforms.unix;
|
||||
|
|
|
@ -31850,6 +31850,11 @@ with pkgs;
|
|||
jack = libjack2;
|
||||
};
|
||||
|
||||
libmpg123 = mpg123.override {
|
||||
libOnly = true;
|
||||
withConplay = false;
|
||||
};
|
||||
|
||||
mpg321 = callPackage ../applications/audio/mpg321 { };
|
||||
|
||||
mpc-cli = callPackage ../applications/audio/mpc {
|
||||
|
|
Loading…
Reference in a new issue