2022-12-01 05:12:36 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, pkg-config
|
2023-05-19 23:04:08 +00:00
|
|
|
, openssl
|
2022-12-01 05:12:36 +00:00
|
|
|
, avahi
|
|
|
|
, alsa-lib
|
|
|
|
, libplist
|
|
|
|
, glib
|
|
|
|
, libdaemon
|
|
|
|
, libsodium
|
|
|
|
, libgcrypt
|
|
|
|
, ffmpeg
|
|
|
|
, libuuid
|
|
|
|
, unixtools
|
|
|
|
, popt
|
|
|
|
, libconfig
|
|
|
|
, libpulseaudio
|
|
|
|
, libjack2
|
|
|
|
, pipewire
|
|
|
|
, soxr
|
|
|
|
, enableAirplay2 ? false
|
|
|
|
, enableStdout ? true
|
|
|
|
, enableAlsa ? true
|
|
|
|
, enablePulse ? true
|
|
|
|
, enablePipe ? true
|
|
|
|
, enablePipewire ? true
|
|
|
|
, enableJack ? true
|
2022-06-01 22:15:40 +00:00
|
|
|
, enableMetadata ? false
|
|
|
|
, enableMpris ? stdenv.isLinux
|
2022-12-01 05:12:36 +00:00
|
|
|
, enableDbus ? stdenv.isLinux
|
|
|
|
, enableSoxr ? true
|
|
|
|
, enableLibdaemon ? false
|
2022-06-01 22:15:40 +00:00
|
|
|
}:
|
2015-05-01 14:54:40 +00:00
|
|
|
|
2023-05-19 23:04:08 +00:00
|
|
|
let
|
|
|
|
inherit (lib) optional optionals;
|
|
|
|
in
|
|
|
|
|
2015-05-01 14:54:40 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2022-12-01 05:12:36 +00:00
|
|
|
version = "4.1.1";
|
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 {
|
|
|
|
rev = version;
|
|
|
|
repo = "shairport-sync";
|
|
|
|
owner = "mikebrady";
|
2022-12-01 05:12:36 +00:00
|
|
|
hash = "sha256-EKt5mH9GmzeR4zdPDFOt26T9STpG1khVrY4DFIv5Maw=";
|
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
|
|
|
|
2023-05-19 23:04:08 +00:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
2015-05-01 14:54:40 +00:00
|
|
|
avahi
|
|
|
|
popt
|
|
|
|
libconfig
|
2022-12-01 05:12:36 +00:00
|
|
|
]
|
|
|
|
++ optional enableLibdaemon libdaemon
|
|
|
|
++ optional enableAlsa alsa-lib
|
|
|
|
++ optional enablePulse libpulseaudio
|
|
|
|
++ optional enablePipewire pipewire
|
|
|
|
++ optional enableJack libjack2
|
|
|
|
++ optional enableSoxr soxr
|
|
|
|
++ optionals enableAirplay2 [
|
|
|
|
libplist
|
|
|
|
libsodium
|
|
|
|
libgcrypt
|
|
|
|
libuuid
|
|
|
|
ffmpeg
|
|
|
|
unixtools.xxd
|
|
|
|
]
|
|
|
|
++ optional stdenv.isLinux glib;
|
2022-06-01 22:15:40 +00:00
|
|
|
|
2022-12-01 05:12:36 +00:00
|
|
|
postPatch = ''
|
2022-06-01 22:15:40 +00:00
|
|
|
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;
|
|
|
|
|
2023-05-19 23:04:08 +00:00
|
|
|
configureFlags = [
|
2018-09-26 16:07:06 +00:00
|
|
|
"--without-configfiles"
|
2019-05-08 10:03:26 +00:00
|
|
|
"--sysconfdir=/etc"
|
2022-12-01 05:12:36 +00:00
|
|
|
"--with-ssl=openssl"
|
|
|
|
"--with-stdout"
|
|
|
|
"--with-avahi"
|
2022-06-01 22:15:40 +00:00
|
|
|
]
|
2022-12-01 05:12:36 +00:00
|
|
|
++ optional enablePulse "--with-pa"
|
|
|
|
++ optional enablePipewire "--with-pw"
|
|
|
|
++ optional enableAlsa "--with-alsa"
|
|
|
|
++ optional enableJack "--with-jack"
|
|
|
|
++ optional enableStdout "--with-stdout"
|
|
|
|
++ optional enablePipe "--with-pipe"
|
|
|
|
++ optional enableSoxr "--with-soxr"
|
|
|
|
++ optional enableDbus "--with-dbus-interface"
|
|
|
|
++ optional enableMetadata "--with-metadata"
|
|
|
|
++ optional enableMpris "--with-mpris-interface"
|
|
|
|
++ optional enableLibdaemon "--with-libdaemon"
|
|
|
|
++ optional enableAirplay2 "--with-airplay-2";
|
2015-05-01 14:54:40 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2022-12-01 05:12:36 +00:00
|
|
|
homepage = "https://github.com/mikebrady/shairport-sync";
|
2015-05-01 14:54:40 +00:00
|
|
|
description = "Airtunes server and emulator with multi-room capabilities";
|
|
|
|
license = licenses.mit;
|
2022-12-01 05:12:36 +00:00
|
|
|
maintainers = with maintainers; [ lnl7 jordanisaacs ];
|
2015-05-01 14:54:40 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|