Commit c9e19143 authored by sternenseemann's avatar sternenseemann
Browse files

shairport-sync: fix cross compilation

- Tools from the glib.dev output need to be in PATH for cross
  compilation to work. Not sure if there is a cleaner way than my string
  trick to do it…

- The upstream configure script neglects to check for $AR properly, so
  we need to pass it explicitly.
parent e5121d28
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -49,7 +49,21 @@ stdenv.mkDerivation rec {
    hash = "sha256-ru2iaXSgS+w2ktqGLGC9SiYztkmmOQVzHaeLwMqvMzk=";
  };

  nativeBuildInputs = [ autoreconfHook pkg-config ];
  nativeBuildInputs = [
    autoreconfHook
    pkg-config
    # For glib we want the `dev` output for the same library we are
    # also linking against, since pkgsHostTarget.glib.dev exposes
    # some extra tools that are built for build->host execution.
    # To achieve this, we coerce the output to a string to prevent
    # mkDerivation's splicing logic from kicking in.
    "${glib.dev}"
  ];

  makeFlags = [
    # Workaround for https://github.com/mikebrady/shairport-sync/issues/1705
    "AR=${stdenv.cc.bintools.targetPrefix}ar"
  ];

  buildInputs = [
    openssl
@@ -100,6 +114,8 @@ stdenv.mkDerivation rec {
  ++ optional enableLibdaemon "--with-libdaemon"
  ++ optional enableAirplay2 "--with-airplay-2";

  strictDeps = true;

  meta = with lib; {
    homepage = "https://github.com/mikebrady/shairport-sync";
    description = "Airtunes server and emulator with multi-room capabilities";