2022-06-26 10:26:21 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
|
|
|
, autoreconfHook, pkg-config
|
|
|
|
, openssl, avahi, alsa-lib, glib, libdaemon, popt, libconfig, libpulseaudio, soxr
|
|
|
|
, enableDbus ? stdenv.isLinux
|
|
|
|
, enableMetadata ? false
|
|
|
|
, enableMpris ? stdenv.isLinux
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
with lib;
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "3.3.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "shairport-sync";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-JLgnsLjswj0qus1Vd5ZtPQbbIp3dp2pI7OfQG4JrdW8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = version;
|
|
|
|
repo = "shairport-sync";
|
|
|
|
owner = "mikebrady";
|
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
avahi
|
2021-06-28 23:13:55 +00:00
|
|
|
alsa-lib
|
2020-04-24 23:36:52 +00:00
|
|
|
libdaemon
|
|
|
|
popt
|
|
|
|
libconfig
|
|
|
|
libpulseaudio
|
|
|
|
soxr
|
2022-06-26 10:26:21 +00:00
|
|
|
] ++ optional stdenv.isLinux glib;
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
sed -i -e 's/G_BUS_TYPE_SYSTEM/G_BUS_TYPE_SESSION/g' dbus-service.c
|
|
|
|
sed -i -e 's/G_BUS_TYPE_SYSTEM/G_BUS_TYPE_SESSION/g' mpris-service.c
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-alsa" "--with-pipe" "--with-pa" "--with-stdout"
|
|
|
|
"--with-avahi" "--with-ssl=openssl" "--with-soxr"
|
|
|
|
"--without-configfiles"
|
|
|
|
"--sysconfdir=/etc"
|
2022-06-26 10:26:21 +00:00
|
|
|
]
|
|
|
|
++ optional enableDbus "--with-dbus-interface"
|
|
|
|
++ optional enableMetadata "--with-metadata"
|
|
|
|
++ optional enableMpris "--with-mpris-interface";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit (src.meta) homepage;
|
|
|
|
description = "Airtunes server and emulator with multi-room capabilities";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ lnl7 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|