anchor.diff:  , dhcp-client ? "dhclient"
     , dhcp
     , dhcpcd
  +
  +, findHardcodedPaths ? false  # for derivation testing only
   
   , channel
   }:
  
positive.code: 
    postPatch = ''
      patchShebangs ./tools/create-exports-NetworkManager.sh
    '' + /* FIXME: don't use an impure runtime path
                   fix hardcoded `mobprobe` search path */ ''
      sed -i src/NetworkManagerUtils.c \
        -e 's,/sbin/modprobe,/run/current-system/sw/sbin/modprobe,'
    '' + /* Fix hardcoded paths in source */ /*''
      sed -i src/devices/nm-device.c \
        -e 's,/usr/bin/ping,${inetutils}/bin/ping,'
    '' +*/ /* fix hardcoded paths in udev rules */ ''
      sed -i data/84-nm-drivers.rules \
        -e 's,/bin/sh,${stdenv.shell},'
      sed -i data/85-nm-unmanaged.rules \
        -e 's,/bin/sh,${stdenv.shell},' \
        -e 's,/usr/sbin/ethtool,${ethtool}/sbin/ethtool,' \
        -e 's,/bin/sed,${gnused}/bin/sed,'
    '' + /* Fix hardcoded paths in configure script */ ''
      sed -i configure{,.ac} \
        -e 's,/usr/bin/uname,${coreutils}/bin/uname,'
    '';
  
    preConfigure = ''
  
negative.code:         if dhcpcd != null then "=${dhcpcd}/bin/dhcpcd" else ""}"
      "--${boolWt (dhcp-client == "dhcpcd")}-dhcpcd-supports-ipv6"
      "--with-config-dhcp-default=${dhcp-client}"
      "--with-resolvconf=${openresolv}/bin/resolvconf"
      "--without-netconfig"
      #"--with-config-dns-rc-manager-default=symlink|file|netconfig|resolvconf"
      "--with-iptables=${iptables}/bin/iptables"
  