diff options
author | Sören Tempel <soeren@soeren-tempel.net> | 2025-01-11 13:55:14 +0100 |
---|---|---|
committer | Zheng Junjie <873216071@qq.com> | 2025-01-27 08:46:38 +0800 |
commit | b77d0523ed7d4484076f79b567c3d5afa63068a3 (patch) | |
tree | 854ab9dc2135c5590705bb5ae04ac1743e539183 | |
parent | b213b0d360d8119da152c9f57a0d341e314eaa5f (diff) |
gnu: Add dhcpcd.
* gnu/packages/admin.scm (dhcpcd): new procedure.
Change-Id: I963b7b32dd4c5aaf40371e310bb96fa20e51504d
Signed-off-by: Zheng Junjie <873216071@qq.com>
-rw-r--r-- | gnu/packages/admin.scm | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 82de7c360f..959a63c5c7 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -1787,6 +1787,61 @@ maintenance releases.") (license license:mpl2.0) (properties '((cpe-name . "dhcp")))))) +(define-public dhcpcd + (package + (name "dhcpcd") + (version "10.0.6") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/NetworkConfiguration/dhcpcd") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "07n7d5wsmy955i6l8rkcmxhgxjygj2cxgpw79id2hx9w41fbkl5l")))) + (inputs (list bash-minimal coreutils-minimal eudev sed)) + (build-system gnu-build-system) + (arguments + (list + #:test-target "test" + #:configure-flags #~(list "--enable-ipv6" + "--enable-privsep" + "--privsepuser=dhcpcd" + (string-append "--dbdir=" "/var/db/dhcpcd") + (string-append "--rundir=" "/var/run/dhcpcd") + (string-append "CC=" #$(cc-for-target))) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'do-not-create-dbdir + (lambda _ + ;; Make sure that the Makefile doesn't attempt to create + ;; /var/db/dhcpcd for which it doesn't have permissions. + (substitute* "src/Makefile" + (("\\$\\{INSTALL\\} -m \\$\\{DBMODE\\} -d\ + \\$\\{DESTDIR\\}\\$\\{DBDIR\\}") + "")))) + (add-before 'build 'setenv + (lambda _ + (setenv "HOST_SH" (which "sh")))) + (add-after 'install 'wrap-hooks + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((sed (search-input-file inputs "/bin/sed")) + (rm (search-input-file inputs "/bin/rm"))) + (wrap-program (string-append + #$output "/libexec/dhcpcd-run-hooks") + `("PATH" ":" suffix + (,(dirname sed) + ,(dirname rm)))))))))) + (home-page "https://roy.marples.name/projects/dhcpcd") + (synopsis "Feature-rich DHCP and DHCPv6 client") + (description + "Provides a DHCP and a DHCPv6 client. Additionally, +dhcpcd is also an IPv4LL (aka ZeroConf) client. In layperson's terms, +dhcpcd runs on your machine and silently configures your computer to work +on the attached networks without trouble and mostly without configuration.") + (license license:bsd-2))) + (define-public radvd (package (name "radvd") |