dhcpcd: fix static

I've stuck with checking isLinux rather than availableOn, because I
think that even if we ended up with libudev-devd on FreeBSD, we still
wouldn't want to use it in this package when it has its own FreeBSD
support.

+4 -4
+4 -4
pkgs/by-name/dh/dhcpcd/package.nix
··· 8 8 runtimeShellPackage, 9 9 runtimeShell, 10 10 nixosTests, 11 + # Always tries to do dynamic linking for udev. 12 + withUdev ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isStatic, 11 13 enablePrivSep ? false, 12 14 }: 13 15 ··· 27 29 [ 28 30 runtimeShellPackage # So patchShebangs finds a bash suitable for the installed scripts 29 31 ] 30 - ++ lib.optionals stdenv.hostPlatform.isLinux [ 32 + ++ lib.optionals withUdev [ 31 33 udev 32 34 ] 33 35 ++ lib.optionals stdenv.hostPlatform.isFreeBSD [ ··· 58 60 ]; 59 61 60 62 # Check that the udev plugin got built. 61 - postInstall = lib.optionalString ( 62 - udev != null && stdenv.hostPlatform.isLinux 63 - ) "[ -e ${placeholder "out"}/lib/dhcpcd/dev/udev.so ]"; 63 + postInstall = lib.optionalString withUdev "[ -e ${placeholder "out"}/lib/dhcpcd/dev/udev.so ]"; 64 64 65 65 passthru.tests = { 66 66 inherit (nixosTests.networking.scripted)