unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: EuAndreh via Guix-patches via <guix-patches@gnu.org>
To: 44810@debbugs.gnu.org
Cc: EuAndreh <eu@euandre.org>
Subject: [bug#44810] [PATCH] gnu: Add git-open.
Date: Sun, 22 Nov 2020 22:17:07 -0300	[thread overview]
Message-ID: <20201123011708.3436-1-eu@euandre.org> (raw)

* gnu/packages/version-control.scm (git-open): New variable.
---
 gnu/packages/version-control.scm | 34 +++++++++++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 1842528ff6..43085744eb 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -14,7 +14,7 @@
 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
-;;; Copyright © 2017 André <eu@euandre.org>
+;;; Copyright © 2017, 2020 EuAndreh <eu@euandre.org>
 ;;; Copyright © 2017, 2018, 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
 ;;; Copyright © 2017, 2020 Oleg Pykhalov <go.wigust@gmail.com>
@@ -2718,6 +2718,38 @@ videos, datasets, and graphics with text pointers inside Git, while storing the
 file contents on a remote server.")
     (license license:expat)))
 
+(define-public git-open
+  (package
+    (name "git-open")
+    (version "2.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/paulirish/git-open")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "11n46bngvca5wbdbfcxzjhjbfdbad7sgf7h9gf956cb1q8swsdm0"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (let ((source (assoc-ref %build-inputs "source"))
+               (out    (assoc-ref %outputs "out")))
+           (mkdir-p (string-append out "/bin"))
+           (copy-file (string-append source "/git-open")
+                      (string-append out "/bin/git-open"))
+           #t))))
+    (home-page "https://github.com/paulirish/git-open")
+    (synopsis "Shortcut for opening the repository's homepage on the browser")
+    (description
+     "@code{git open} opens the repository's website from the command-line,
+guessing the URL pattern from the 'origin' remote.")
+    (license license:expat)))
+
 (define-public tla
   (package
     (name "gnu-arch")
-- 
2.29.2





             reply	other threads:[~2020-11-23  1:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23  1:17 EuAndreh via Guix-patches via [this message]
2020-11-23 11:44 ` [bug#44810] [PATCH] gnu: Add git-open EuAndreh via Guix-patches via
2020-11-25 23:01   ` Leo Famulari
2020-11-23 19:44 ` [bug#44810] [PATCH v3] " EuAndreh via Guix-patches via
2020-11-25 23:06   ` Leo Famulari
2020-11-26 15:17     ` EuAndreh via Guix-patches via
2020-11-26 19:00       ` Leo Famulari

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=20201123011708.3436-1-eu@euandre.org \
    --to=guix-patches@gnu.org \
    --cc=44810@debbugs.gnu.org \
    --cc=eu@euandre.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).