GNU bug report logs -
#41752
[PATCH] gnu: Add bash-hosts.
Previous Next
Reported by: Oleg Pykhalov <go.wigust <at> gmail.com>
Date: Sun, 7 Jun 2020 18:25:02 UTC
Severity: normal
Tags: patch
Done: Oleg Pykhalov <go.wigust <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Tue, 30 Jun 2020 20:48:36 +0300
with message-id <87366cwikr.fsf <at> gmail.com>
and subject line Re: [bug#41752] [PATCH] gnu: Add bash-hosts.
has caused the debbugs.gnu.org bug report #41752,
regarding [PATCH] gnu: Add bash-hosts.
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
41752: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41752
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
* gnu/packages/admin.scm (bash-hosts): New variable.
---
gnu/packages/admin.scm | 43 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index bb93f7efb1..dd0ada0422 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -3841,3 +3841,46 @@ It supports mounting local filesystems of any kind the normal mount utility
supports. It can also mount encrypted LUKS volumes using the password
supplied by the user when logging in.")
(license (list license:gpl2+ license:lgpl2.1+))))
+
+(define-public bash-hosts
+ (package
+ (name "bash-hosts")
+ (version "3.5.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/xwmx/hosts.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0q02n28sng0757cgkkc7r45krs07j993k6sgyyp27n8v0l8q6fv4"))))
+ (build-system trivial-build-system)
+ (inputs
+ `(("bash" ,bash)))
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (copy-recursively (assoc-ref %build-inputs "source") ".")
+ (substitute* "hosts"
+ (("/usr/bin/env bash")
+ (string-append (assoc-ref %build-inputs "bash")
+ "/bin/bash")))
+ (install-file "hosts" (string-append %output "/bin"))
+ (let ((bash-completion (string-append %output
+ "/etc/bash_completion.d")))
+ (mkdir-p bash-completion)
+ (copy-file "etc/hosts-completion.bash"
+ (string-append bash-completion "/hosts")))
+ #t)))
+ (home-page "https://github.com/xwmx/hosts/")
+ (synopsis "Command line hosts file editor in a single portable script")
+ (description "@code{hosts} is a command line program for managing hosts
+file entries. @code{hosts} works with existing hosts files and entries,
+making it easier to add, remove, comment, and search hosts file entries using
+simple, memorable commands. @code{hosts} is designed to be lightweight, easy
+to use, and contained in a single, portable script that can be curled into any
+environment.")
+ (license license:expat)))
--
2.26.2
[Message part 3 (message/rfc822, inline)]
[Message part 4 (text/plain, inline)]
Hello,
Thank you for review!
I applied all your suggestions, added ZSH completion and tests.
Pushed as ceb233bb7642b2a7efec57073bf205b62ebd8f97.
Oleg.
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 4 years and 329 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.