@@ -22,12 +22,20 @@ stdenv.mkDerivation rec {
2222
2323 configureFlags = [ "--disable-oss" ];
2424
25− patchFlags = "-p0";
26− patches = stdenv.lib.optional stdenv.isDarwin
25+ patches = [
2726 (fetchpatch {
27+ name = "0001-gtk-Don-t-assume-all-GdkDisplays-are-GdkX11Displays-.patch";
28+ url = http://git.0pointer.net/libcanberra.git/patch/?id=c0620e432650e81062c1967cc669829dbd29b310;
29+ sha256 = "0rc7zwn39yxzxp37qh329g7375r5ywcqcaak8ryd0dgvg8m5hcx9";
30+ })
31+ ];
32+
33+ postPatch = (stdenv.lib.optional stdenv.isDarwin) ''
34+ patch -p0 < ${fetchpatch {
2835 url = "https://raw.githubusercontent.com/macports/macports-ports/master/audio/libcanberra/files/patch-configure.diff";
2936 sha256 = "1f7h7ifpqvbfhqygn1b7klvwi80zmpv3538vbmq7ql7bkf1q8h31";
30− });
37+ }}
38+ '';
3139
3240 postInstall = ''
3341 for f in $out/lib/*.la; do