avahi: Simplify pkg-config cross fix

Building `pkgsCross.aarch64-multiplatform.avahi` would fail in the past with:

    checking for pkg-config... no
    configure: error: pkg-config is required to install this program

To fix that, two independent workarounds were applied, each sufficient:

- 34e4d0fd98
- 65a5313de5

These days, it is more common to just add `pkg-config` to `depsBuildBuild`.
main
Jan Tojnar 2 years ago
parent c55e200bb0
commit 14dafc194f
  1. 15
      pkgs/development/libraries/avahi/default.nix

@ -25,11 +25,6 @@
assert qt4Support -> qt4 != null;
let
# despite the configure script claiming it supports $PKG_CONFIG, it doesnt respect it
pkg-config-helper = writeShellScriptBin "pkg-config" ''exec $PKG_CONFIG "$@"'';
in
stdenv.mkDerivation rec {
pname = "avahi${lib.optionalString withLibdnssdCompat "-compat"}";
version = "0.8";
@ -48,9 +43,12 @@ stdenv.mkDerivation rec {
})
];
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
pkg-config
pkg-config-helper
gettext
glib
];
@ -100,11 +98,6 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-DAVAHI_SERVICE_DIR=\"/etc/avahi/services\"";
prePatch = ''
substituteInPlace configure \
--replace pkg-config "$PKG_CONFIG"
'';
preBuild = lib.optionalString stdenv.isDarwin ''
sed -i '20 i\
#define __APPLE_USE_RFC_2292' \

Loading…
Cancel
Save