diff --git a/nixos/modules/services/networking/dhcpcd.nix b/nixos/modules/services/networking/dhcpcd.nix index 31e4b6ad2988..7d50c9477bd5 100644 --- a/nixos/modules/services/networking/dhcpcd.nix +++ b/nixos/modules/services/networking/dhcpcd.nix @@ -207,7 +207,7 @@ in serviceConfig = { Type = "forking"; - PIDFile = "/run/dhcpcd.pid"; + PIDFile = "/run/dhcpcd/pid"; ExecStart = "@${dhcpcd}/sbin/dhcpcd dhcpcd --quiet ${optionalString cfg.persistent "--persistent"} --config ${dhcpcdConf}"; ExecReload = "${dhcpcd}/sbin/dhcpcd --rebind"; Restart = "always"; diff --git a/pkgs/tools/networking/dhcpcd/default.nix b/pkgs/tools/networking/dhcpcd/default.nix index 0962335ad1a3..8927e8e76aa0 100644 --- a/pkgs/tools/networking/dhcpcd/default.nix +++ b/pkgs/tools/networking/dhcpcd/default.nix @@ -1,15 +1,20 @@ -{ lib, stdenv, fetchurl, fetchpatch, pkg-config, udev, runtimeShellPackage, -runtimeShell }: +{ lib +, stdenv +, fetchurl +, pkg-config +, udev +, runtimeShellPackage +, runtimeShell +, nixosTests +}: stdenv.mkDerivation rec { - # when updating this to >=7, check, see previous reverts: - # nix-build -A nixos.tests.networking.scripted.macvlan.x86_64-linux nixos/release-combined.nix pname = "dhcpcd"; - version = "8.1.4"; + version = "9.4.1"; src = fetchurl { url = "mirror://roy/${pname}/${pname}-${version}.tar.xz"; - sha256 = "0gf1qif25wy5lffzw39pi4sshmpxz1f4a1m9sglj7am1gaix3817"; + sha256 = "sha256-gZNXY07+0epc9E7AGyTT0/iFL+yLQkmSXcxWZ8VON2w="; }; nativeBuildInputs = [ pkg-config ]; @@ -22,14 +27,6 @@ stdenv.mkDerivation rec { substituteInPlace hooks/dhcpcd-run-hooks.in --replace /bin/sh ${runtimeShell} ''; - patches = [ - (fetchpatch { - name = "?id=114870290a8d3d696bc4049c32eef3eed03d6070"; - url = "https://roy.marples.name/git/dhcpcd/commitdiff_plain/114870290a8d3d696bc4049c32eef3eed03d6070"; - sha256 = "0kzpwjh2gzvl5lvlnw6lis610p67nassk3apns68ga2pyxlky8qb"; - }) - ]; - preConfigure = "patchShebangs ./configure"; configureFlags = [ @@ -46,6 +43,8 @@ stdenv.mkDerivation rec { # Check that the udev plugin got built. postInstall = lib.optionalString (udev != null) "[ -e ${placeholder "out"}/lib/dhcpcd/dev/udev.so ]"; + passthru.tests = { inherit (nixosTests.networking.scripted) macvlan dhcpSimple dhcpOneIf; }; + meta = with lib; { description = "A client for the Dynamic Host Configuration Protocol (DHCP)"; homepage = "https://roy.marples.name/projects/dhcpcd";