mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 13:58:15 -05:00
gnu: net-tools: Remove the 'hostname' and *domainname commands.
* gnu/packages/linux.scm (net-tools)[arguments]: Add #:modules. Add 'remove-redundant-commands' phase.
This commit is contained in:
parent
80393eeda2
commit
c9e0a44eec
1 changed files with 17 additions and 3 deletions
|
@ -877,7 +877,11 @@ (define-public net-tools
|
|||
(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 @@ (define (apply-patch file)
|
|||
(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 @@ (define (apply-patch file)
|
|||
;; 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.
|
||||
|
|
Loading…
Reference in a new issue