diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2022-05-21 18:51:24 +0200 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2022-05-21 19:30:39 +0200 |
commit | 8fa4e66def1aa4d465d6ab26d155074cf2ec4381 (patch) | |
tree | 4c834176b620deb5e56b3c9d4baa937afd075818 | |
parent | 14dafc194f2b1166084110de1689efac20f1b6af (diff) | |
download | nixpkgs-8fa4e66def1aa4d465d6ab26d155074cf2ec4381.tar nixpkgs-8fa4e66def1aa4d465d6ab26d155074cf2ec4381.tar.gz nixpkgs-8fa4e66def1aa4d465d6ab26d155074cf2ec4381.tar.bz2 nixpkgs-8fa4e66def1aa4d465d6ab26d155074cf2ec4381.tar.lz nixpkgs-8fa4e66def1aa4d465d6ab26d155074cf2ec4381.tar.xz nixpkgs-8fa4e66def1aa4d465d6ab26d155074cf2ec4381.tar.zst nixpkgs-8fa4e66def1aa4d465d6ab26d155074cf2ec4381.zip |
avahi: simplify path handling
-rw-r--r-- | pkgs/development/libraries/avahi/default.nix | 12 | ||||
-rw-r--r-- | pkgs/development/libraries/avahi/no-mkdir-localstatedir.patch | 12 |
2 files changed, 9 insertions, 15 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\ diff --git a/pkgs/development/libraries/avahi/no-mkdir-localstatedir.patch b/pkgs/development/libraries/avahi/no-mkdir-localstatedir.patch deleted file mode 100644 index 72965c9f028..00000000000 --- a/pkgs/development/libraries/avahi/no-mkdir-localstatedir.patch +++ /dev/null @@ -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 |