mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
libcanberra: supports darwin
This commit is contained in:
parent
b0cb40ed4b
commit
eca521aea7
2 changed files with 22 additions and 7 deletions
|
@ -1,5 +1,7 @@
|
|||
{ stdenv, fetchurl, pkgconfig, libtool, gtk ? null, libcap
|
||||
, alsaLib, libpulseaudio, gst_all_1, libvorbis }:
|
||||
{ stdenv, lib, fetchurl, fetchpatch, pkgconfig, libtool
|
||||
, gtk ? null
|
||||
, libpulseaudio, gst_all_1, libvorbis, libcap
|
||||
, withAlsa ? stdenv.isLinux, alsaLib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libcanberra-0.30";
|
||||
|
@ -11,11 +13,20 @@ stdenv.mkDerivation rec {
|
|||
|
||||
nativeBuildInputs = [ pkgconfig libtool ];
|
||||
buildInputs = [
|
||||
alsaLib libpulseaudio libvorbis gtk libcap
|
||||
] ++ (with gst_all_1; [ gstreamer gst-plugins-base ]);
|
||||
libpulseaudio libvorbis gtk
|
||||
] ++ (with gst_all_1; [ gstreamer gst-plugins-base ])
|
||||
++ lib.optional stdenv.isLinux libcap
|
||||
++ lib.optional withAlsa alsaLib;
|
||||
|
||||
configureFlags = "--disable-oss";
|
||||
|
||||
patchFlags = "-p0";
|
||||
patches = stdenv.lib.optional stdenv.isDarwin
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/macports/macports-ports/master/audio/libcanberra/files/patch-configure.diff";
|
||||
sha256 = "1f7h7ifpqvbfhqygn1b7klvwi80zmpv3538vbmq7ql7bkf1q8h31";
|
||||
});
|
||||
|
||||
postInstall = ''
|
||||
for f in $out/lib/*.la; do
|
||||
sed 's|-lltdl|-L${libtool.lib}/lib -lltdl|' -i $f
|
||||
|
@ -42,6 +53,6 @@ stdenv.mkDerivation rec {
|
|||
license = stdenv.lib.licenses.lgpl2Plus;
|
||||
|
||||
maintainers = [ ];
|
||||
platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; # arbitrary choice
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9809,8 +9809,12 @@ with pkgs;
|
|||
};
|
||||
|
||||
libcanberra = callPackage ../development/libraries/libcanberra { };
|
||||
libcanberra-gtk3 = pkgs.libcanberra.override { gtk = pkgs.gtk3; };
|
||||
libcanberra-gtk2 = pkgs.libcanberra-gtk3.override { gtk = pkgs.gtk2; };
|
||||
libcanberra-gtk3 = pkgs.libcanberra.override {
|
||||
gtk = gtk3;
|
||||
};
|
||||
libcanberra-gtk2 = pkgs.libcanberra-gtk3.override {
|
||||
gtk = gtk2.override { gdktarget = "x11"; };
|
||||
};
|
||||
|
||||
libcanberra_kde = if (config.kde_runtime.libcanberraWithoutGTK or true)
|
||||
then pkgs.libcanberra
|
||||
|
|
Loading…
Reference in a new issue