unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Oleg Pykhalov <go.wigust@gmail.com>
To: 41752@debbugs.gnu.org
Cc: Oleg Pykhalov <go.wigust@gmail.com>
Subject: [bug#41752] [PATCH] gnu: Add bash-hosts.
Date: Sun,  7 Jun 2020 21:24:10 +0300	[thread overview]
Message-ID: <20200607182410.4594-1-go.wigust@gmail.com> (raw)

* 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





             reply	other threads:[~2020-06-07 18:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-07 18:24 Oleg Pykhalov [this message]
2020-06-07 19:25 ` [bug#41752] [PATCH] gnu: Add bash-hosts Tobias Geerinckx-Rice via Guix-patches via
2020-06-07 23:45   ` Tobias Geerinckx-Rice via Guix-patches via
2020-06-30 17:48     ` bug#41752: " Oleg Pykhalov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200607182410.4594-1-go.wigust@gmail.com \
    --to=go.wigust@gmail.com \
    --cc=41752@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).