mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-19 04:03:56 +00:00
ac0c5236bb
* shairport-sync: 4.1.1 -> 4.2 * Apply suggestions from code review --------- Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
111 lines
2.4 KiB
Nix
111 lines
2.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, autoreconfHook
|
|
, pkg-config
|
|
, openssl
|
|
, 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
|
|
, enableMetadata ? false
|
|
, enableMpris ? stdenv.isLinux
|
|
, enableDbus ? stdenv.isLinux
|
|
, enableSoxr ? true
|
|
, enableLibdaemon ? false
|
|
}:
|
|
|
|
let
|
|
inherit (lib) optional optionals;
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "shairport-sync";
|
|
version = "4.2";
|
|
|
|
src = fetchFromGitHub {
|
|
repo = "shairport-sync";
|
|
owner = "mikebrady";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-ru2iaXSgS+w2ktqGLGC9SiYztkmmOQVzHaeLwMqvMzk=";
|
|
};
|
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
|
|
|
buildInputs = [
|
|
openssl
|
|
avahi
|
|
popt
|
|
libconfig
|
|
]
|
|
++ 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;
|
|
|
|
postPatch = ''
|
|
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
|
|
'';
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
configureFlags = [
|
|
"--without-configfiles"
|
|
"--sysconfdir=/etc"
|
|
"--with-ssl=openssl"
|
|
"--with-stdout"
|
|
"--with-avahi"
|
|
]
|
|
++ 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";
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/mikebrady/shairport-sync";
|
|
description = "Airtunes server and emulator with multi-room capabilities";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ lnl7 jordanisaacs ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|