nixpkgs/pkgs/servers/shairport-sync/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

111 lines
2.4 KiB
Nix
Raw Normal View History

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
, enableMetadata ? false
, enableMpris ? stdenv.isLinux
2022-12-01 05:12:36 +00:00
, enableDbus ? stdenv.isLinux
, enableSoxr ? true
, enableLibdaemon ? false
}:
2023-05-19 23:04:08 +00:00
let
inherit (lib) optional optionals;
in
stdenv.mkDerivation rec {
2022-12-01 05:12:36 +00:00
version = "4.1.1";
pname = "shairport-sync";
src = fetchFromGitHub {
rev = version;
repo = "shairport-sync";
owner = "mikebrady";
2022-12-01 05:12:36 +00:00
hash = "sha256-EKt5mH9GmzeR4zdPDFOt26T9STpG1khVrY4DFIv5Maw=";
};
nativeBuildInputs = [ autoreconfHook pkg-config ];
2017-07-30 15:14:46 +00:00
2023-05-19 23:04:08 +00:00
buildInputs = [
openssl
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-12-01 05:12:36 +00:00
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;
2023-05-19 23:04:08 +00:00
configureFlags = [
"--without-configfiles"
"--sysconfdir=/etc"
2022-12-01 05:12:36 +00:00
"--with-ssl=openssl"
"--with-stdout"
"--with-avahi"
]
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";
meta = with lib; {
2022-12-01 05:12:36 +00:00
homepage = "https://github.com/mikebrady/shairport-sync";
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 ];
platforms = platforms.unix;
};
}