2022-12-01 06:12:36 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, pkg-config
|
2023-05-20 01:04:08 +02:00
|
|
|
, openssl
|
2022-12-01 06:12:36 +01: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-02 00:15:40 +02:00
|
|
|
, enableMetadata ? false
|
|
|
|
, enableMpris ? stdenv.isLinux
|
2022-12-01 06:12:36 +01:00
|
|
|
, enableDbus ? stdenv.isLinux
|
|
|
|
, enableSoxr ? true
|
|
|
|
, enableLibdaemon ? false
|
2022-06-02 00:15:40 +02:00
|
|
|
}:
|
2015-05-01 16:54:40 +02:00
|
|
|
|
2023-05-20 01:04:08 +02:00
|
|
|
let
|
|
|
|
inherit (lib) optional optionals;
|
|
|
|
in
|
|
|
|
|
2015-05-01 16:54:40 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2022-12-01 06:12:36 +01:00
|
|
|
version = "4.1.1";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "shairport-sync";
|
2015-05-01 16:54:40 +02:00
|
|
|
|
2015-07-07 14:09:38 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = version;
|
|
|
|
repo = "shairport-sync";
|
|
|
|
owner = "mikebrady";
|
2022-12-01 06:12:36 +01:00
|
|
|
hash = "sha256-EKt5mH9GmzeR4zdPDFOt26T9STpG1khVrY4DFIv5Maw=";
|
2015-05-01 16:54:40 +02:00
|
|
|
};
|
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2017-07-30 17:14:46 +02:00
|
|
|
|
2023-05-20 01:04:08 +02:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
2015-05-01 16:54:40 +02:00
|
|
|
avahi
|
|
|
|
popt
|
|
|
|
libconfig
|
2022-12-01 06:12:36 +01: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-02 00:15:40 +02:00
|
|
|
|
2022-12-01 06:12:36 +01:00
|
|
|
postPatch = ''
|
2022-06-02 00:15:40 +02: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 16:54:40 +02:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2023-05-20 01:04:08 +02:00
|
|
|
configureFlags = [
|
2018-09-26 18:07:06 +02:00
|
|
|
"--without-configfiles"
|
2019-05-08 12:03:26 +02:00
|
|
|
"--sysconfdir=/etc"
|
2022-12-01 06:12:36 +01:00
|
|
|
"--with-ssl=openssl"
|
|
|
|
"--with-stdout"
|
|
|
|
"--with-avahi"
|
2022-06-02 00:15:40 +02:00
|
|
|
]
|
2022-12-01 06:12:36 +01: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 16:54:40 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2022-12-01 06:12:36 +01:00
|
|
|
homepage = "https://github.com/mikebrady/shairport-sync";
|
2015-05-01 16:54:40 +02:00
|
|
|
description = "Airtunes server and emulator with multi-room capabilities";
|
|
|
|
license = licenses.mit;
|
2022-12-01 06:12:36 +01:00
|
|
|
maintainers = with maintainers; [ lnl7 jordanisaacs ];
|
2015-05-01 16:54:40 +02:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|