Unverified Commit 27bf6198 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

pulseaudio: fix build for FreeBSD (#387700)

parents 3ea41d40 0dc89fd2
Loading
Loading
Loading
Loading
+14 −3
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ stdenv.mkDerivation rec {
      perlPackages.XMLParser
      m4
    ]
    ++ lib.optionals stdenv.hostPlatform.isLinux [ glib ]
    ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ glib ]
    # gstreamer plugin discovery requires wrapping
    ++ lib.optional (bluetoothSupport && advancedBluetoothCodecs) wrapGAppsHook3;

@@ -130,7 +130,7 @@ stdenv.mkDerivation rec {
      fftwFloat
      check
    ]
    ++ lib.optionals stdenv.hostPlatform.isLinux [
    ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
      glib
      dbus
    ]
@@ -139,6 +139,8 @@ stdenv.mkDerivation rec {
      Cocoa
      CoreServices
      CoreAudio
    ]
    ++ lib.optionals (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isFreeBSD) [
      libintl
    ]
    ++ lib.optionals (!libOnly) (
@@ -179,6 +181,13 @@ stdenv.mkDerivation rec {
      ++ lib.optional zeroconfSupport avahi
    );

  env =
    lib.optionalAttrs (stdenv.cc.bintools.isLLVM && lib.versionAtLeast stdenv.cc.bintools.version "17")
      {
        # https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/3848
        NIX_LDFLAGS = "--undefined-version";
      };

  mesonFlags =
    [
      (lib.mesonEnable "alsa" (!libOnly && alsaSupport))
@@ -274,7 +283,9 @@ stdenv.mkDerivation rec {
      done
    '';

  passthru.tests = { inherit (nixosTests) pulseaudio; };
  passthru.tests = {
    inherit (nixosTests) pulseaudio;
  };

  meta = {
    description = "Sound server for POSIX and Win32 systems";