summary refs log tree commit diff
path: root/pkgs/development/libraries/avahi/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/avahi/default.nix')
-rw-r--r--pkgs/development/libraries/avahi/default.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/development/libraries/avahi/default.nix b/pkgs/development/libraries/avahi/default.nix
index d3e20b0422b..7ab9220be71 100644
--- a/pkgs/development/libraries/avahi/default.nix
+++ b/pkgs/development/libraries/avahi/default.nix
@@ -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\