2022-06-01 22:15:40 +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
|
|
|
|
}:
|
2015-05-01 14:54:40 +00:00
|
|
|
|
2022-06-01 22:15:40 +00:00
|
|
|
with lib;
|
2015-05-01 14:54:40 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-12-15 19:09:21 +00:00
|
|
|
version = "3.3.9";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "shairport-sync";
|
2015-05-01 14:54:40 +00:00
|
|
|
|
2015-07-07 12:09:38 +00:00
|
|
|
src = fetchFromGitHub {
|
2021-12-15 19:09:21 +00:00
|
|
|
sha256 = "sha256-JLgnsLjswj0qus1Vd5ZtPQbbIp3dp2pI7OfQG4JrdW8=";
|
2015-07-07 12:09:38 +00:00
|
|
|
rev = version;
|
|
|
|
repo = "shairport-sync";
|
|
|
|
owner = "mikebrady";
|
2015-05-01 14:54:40 +00:00
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2017-07-30 15:14:46 +00:00
|
|
|
|
2015-05-01 14:54:40 +00:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
avahi
|
2021-06-10 02:57:09 +00:00
|
|
|
alsa-lib
|
2015-05-01 14:54:40 +00:00
|
|
|
libdaemon
|
|
|
|
popt
|
|
|
|
libconfig
|
2015-05-27 19:42:15 +00:00
|
|
|
libpulseaudio
|
2015-07-07 12:09:38 +00:00
|
|
|
soxr
|
2022-06-01 22:15:40 +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
|
|
|
|
'';
|
2015-05-01 14:54:40 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-07-25 21:44:21 +00:00
|
|
|
configureFlags = [
|
2018-09-26 16:07:06 +00:00
|
|
|
"--with-alsa" "--with-pipe" "--with-pa" "--with-stdout"
|
2018-07-25 21:44:21 +00:00
|
|
|
"--with-avahi" "--with-ssl=openssl" "--with-soxr"
|
2018-09-26 16:07:06 +00:00
|
|
|
"--without-configfiles"
|
2019-05-08 10:03:26 +00:00
|
|
|
"--sysconfdir=/etc"
|
2022-06-01 22:15:40 +00:00
|
|
|
]
|
|
|
|
++ optional enableDbus "--with-dbus-interface"
|
|
|
|
++ optional enableMetadata "--with-metadata"
|
|
|
|
++ optional enableMpris "--with-mpris-interface";
|
2015-05-01 14:54:40 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-07-07 12:09:38 +00:00
|
|
|
inherit (src.meta) homepage;
|
2015-05-01 14:54:40 +00:00
|
|
|
description = "Airtunes server and emulator with multi-room capabilities";
|
|
|
|
license = licenses.mit;
|
2017-07-30 15:14:46 +00:00
|
|
|
maintainers = with maintainers; [ lnl7 ];
|
2015-05-01 14:54:40 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|