avahi: simplify path handling
This commit is contained in:
parent
14dafc194f
commit
8fa4e66def
|
@ -35,8 +35,6 @@ stdenv.mkDerivation rec {
|
|||
};
|
||||
|
||||
patches = [
|
||||
./no-mkdir-localstatedir.patch
|
||||
|
||||
(fetchpatch {
|
||||
url = "https://github.com/lathiat/avahi/commit/9d31939e55280a733d930b15ac9e4dda4497680c.patch";
|
||||
sha256 = "sha256-BXWmrLWUvDxKPoIPRFBpMS3T4gijRw0J+rndp6iDybU=";
|
||||
|
@ -80,12 +78,15 @@ stdenv.mkDerivation rec {
|
|||
configureFlags = [
|
||||
"--disable-gdbm"
|
||||
"--disable-mono"
|
||||
# Use non-deprecated path https://github.com/lathiat/avahi/pull/376
|
||||
"--with-dbus-sys=${placeholder "out"}/share/dbus-1/system.d"
|
||||
(lib.enableFeature gtk3Support "gtk3")
|
||||
(lib.enableFeature qt4Support "qt4")
|
||||
(lib.enableFeature qt5Support "qt5")
|
||||
(lib.enableFeature withPython "python")
|
||||
"--localstatedir=/var"
|
||||
"--runstatedir=/run"
|
||||
"--sysconfdir=/etc"
|
||||
"--with-distro=none"
|
||||
# A systemd unit is provided by the avahi-daemon NixOS module
|
||||
"--with-systemdsystemunitdir=no"
|
||||
|
@ -96,7 +97,12 @@ stdenv.mkDerivation rec {
|
|||
"--disable-autoipd"
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-DAVAHI_SERVICE_DIR=\"/etc/avahi/services\"";
|
||||
installFlags = [
|
||||
# Override directories to install into the package.
|
||||
# Replace with runstatedir once is merged https://github.com/lathiat/avahi/pull/377
|
||||
"avahi_runtime_dir=${placeholder "out"}/run"
|
||||
"sysconfdir=${placeholder "out"}/etc"
|
||||
];
|
||||
|
||||
preBuild = lib.optionalString stdenv.isDarwin ''
|
||||
sed -i '20 i\
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
Don't "mkdir $(localstatedir)" since we can't do it (/var).
|
||||
|
||||
--- a/avahi-daemon/Makefile.in
|
||||
+++ b/avahi-daemon/Makefile.in
|
||||
@@ -1625,7 +1625,6 @@ xmllint:
|
||||
done
|
||||
|
||||
install-data-local:
|
||||
- test -z "$(avahi_runtime_dir)" || $(MKDIR_P) "$(DESTDIR)$(avahi_runtime_dir)"
|
||||
|
||||
update-systemd:
|
||||
curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c > sd-daemon.c
|
Loading…
Reference in a new issue