Merge pull request #175860 from reedrw/shairport-sync-optionals
shairport-sync: add dbus, mpris, metadata flags
This commit is contained in:
commit
d95cf682d8
1 changed files with 18 additions and 4 deletions
|
@ -1,6 +1,12 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, openssl, avahi, alsa-lib
|
||||
, libdaemon, popt, pkg-config, libconfig, libpulseaudio, soxr }:
|
||||
{ lib, stdenv, fetchFromGitHub
|
||||
, autoreconfHook, pkg-config
|
||||
, openssl, avahi, alsa-lib, glib, libdaemon, popt, libconfig, libpulseaudio, soxr
|
||||
, enableDbus ? stdenv.isLinux
|
||||
, enableMetadata ? false
|
||||
, enableMpris ? stdenv.isLinux
|
||||
}:
|
||||
|
||||
with lib;
|
||||
stdenv.mkDerivation rec {
|
||||
version = "3.3.9";
|
||||
pname = "shairport-sync";
|
||||
|
@ -23,7 +29,12 @@ stdenv.mkDerivation rec {
|
|||
libconfig
|
||||
libpulseaudio
|
||||
soxr
|
||||
];
|
||||
] ++ 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
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
@ -32,7 +43,10 @@ stdenv.mkDerivation rec {
|
|||
"--with-avahi" "--with-ssl=openssl" "--with-soxr"
|
||||
"--without-configfiles"
|
||||
"--sysconfdir=/etc"
|
||||
];
|
||||
]
|
||||
++ optional enableDbus "--with-dbus-interface"
|
||||
++ optional enableMetadata "--with-metadata"
|
||||
++ optional enableMpris "--with-mpris-interface";
|
||||
|
||||
meta = with lib; {
|
||||
inherit (src.meta) homepage;
|
||||
|
|
Loading…
Reference in a new issue