aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-02-13 20:37:56 +0100
committerLudovic Courtès <ludo@gnu.org>2015-02-13 20:38:05 +0100
commitc9e0a44eec12a1e673b518264a7cbc0883670cf5 (patch)
tree1d88f6e2bdce16a34324307f5420af57cc505067
parent80393eeda23db166e2c3fde8fa884089b0e8dad4 (diff)
downloadguix-c9e0a44eec12a1e673b518264a7cbc0883670cf5.tar
guix-c9e0a44eec12a1e673b518264a7cbc0883670cf5.tar.gz
gnu: net-tools: Remove the 'hostname' and *domainname commands.
* gnu/packages/linux.scm (net-tools)[arguments]: Add #:modules. Add 'remove-redundant-commands' phase.
-rw-r--r--gnu/packages/linux.scm20
1 files changed, 17 insertions, 3 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index fc95a0b896..0999b57329 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -877,7 +877,11 @@ manpages.")
(list (search-patch "net-tools-bitrot.patch")))))
(build-system gnu-build-system)
(arguments
- '(#:phases (alist-cons-after
+ '(#:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (srfi srfi-1)
+ (srfi srfi-26))
+ #:phases (alist-cons-after
'unpack 'patch
(lambda* (#:key inputs #:allow-other-keys)
(define (apply-patch file)
@@ -888,7 +892,6 @@ manpages.")
(format #t "applying Debian patch set '~a'...~%"
patch.gz)
(system (string-append "gunzip < " patch.gz " > the-patch"))
- (pk 'here)
(and (apply-patch "the-patch")
(for-each apply-patch
(find-files "debian/patches"
@@ -907,7 +910,18 @@ manpages.")
;; definition.
(substitute* '("config.make" "config.h")
(("^.*HAVE_AFDECnet.*$") ""))))
- %standard-phases))
+ (alist-cons-after
+ 'install 'remove-redundant-commands
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Remove commands and man pages redundant with
+ ;; Inetutils.
+ (let* ((out (assoc-ref outputs "out"))
+ (dup (append-map (cut find-files out <>)
+ '("^hostname"
+ "^(yp|nis|dns)?domainname"))))
+ (for-each delete-file dup)
+ #t))
+ %standard-phases)))
;; Binaries that depend on libnet-tools.a don't declare that
;; dependency, making it parallel-unsafe.