summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMaxime Devos <maximedevos@telenet.be>2021-06-30 15:43:42 +0200
committerMathieu Othacehe <othacehe@gnu.org>2021-08-29 11:57:47 +0200
commit7256d9d2049352e9a63594eb558dc44978bd6687 (patch)
tree63687a5d6f1c5e4890a584d494b81d9bc3085f12 /gnu
parent9734da36f209b50bdaee8f2abc8748fe9b7cff6d (diff)
downloadguix-patches-7256d9d2049352e9a63594eb558dc44978bd6687.tar
guix-patches-7256d9d2049352e9a63594eb558dc44978bd6687.tar.gz
isc-dhcp: Fix dhclient-script wrapper when cross-compiling.
This causes many rebuilds, but only when cross-compiling. This should unbreak Internet access on cross-compiled pinebook images. Reported-By: Guest4977 (on IRC) * gnu/gnunet/packages/admin.scm (isc-dhcp)[arguments]<#:phases>{post-install}: Use the cross-compiled bash when cross-compiling. Work-around <https://issues.guix.gnu.org/49290>. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/admin.scm25
1 files changed, 24 insertions, 1 deletions
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 63cf85f64b..f9b0abac34 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -43,6 +43,7 @@
;;; Copyright © 2021 WinterHound <winterhound@yandex.com>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1232,7 +1233,11 @@ connection alive.")
"--owner=root:0"
"--group=root:0")))))
(add-after 'install 'post-install
- (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; TODO(core-updates): native-inputs isn't required anymore.
+ (lambda* (#:key ,@(if (%current-target-system)
+ '(native-inputs)
+ '())
+ inputs outputs #:allow-other-keys)
;; Install the dhclient script for GNU/Linux and make sure
;; if finds all the programs it needs.
(let* ((out (assoc-ref outputs "out"))
@@ -1257,6 +1262,19 @@ connection alive.")
(string-append dir "/bin:"
dir "/sbin"))
(list inetutils net-tools coreutils sed))))
+ ;; TODO(core-updates): should not be required anymore,
+ ;; once <https://issues.guix.gnu.org/49290> has been merged.
+ ,@(if (%current-target-system)
+ '((for-each
+ (lambda (file)
+ (substitute* file
+ (((assoc-ref native-inputs "bash"))
+ (assoc-ref inputs "bash"))))
+ (list (string-append libexec
+ "/dhclient-script")
+ (string-append libexec
+ "/.dhclient-script-real"))))
+ '())
#t))))))
(native-inputs
@@ -1264,6 +1282,11 @@ connection alive.")
("file" ,file)))
(inputs `(("inetutils" ,inetutils)
+ ;; TODO(core-updates): simply make this unconditional
+ ,@(if (%current-target-system)
+ ;; for wrap-program
+ `(("bash" ,(canonical-package bash-minimal)))
+ '())
,@(if (hurd-target?) '()
`(("net-tools" ,net-tools)
("iproute" ,iproute)))