unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#32662] shellutils.scm - add hstr
@ 2018-09-08  3:17 Benjamin Slade
  2018-09-10 13:28 ` bug#32662: " Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Slade @ 2018-09-08  3:17 UTC (permalink / raw)
  To: 32662

[-- Attachment #1: Type: text/plain, Size: 68 bytes --]

gnu: Add hstr

* gnu/packages/shellutils.scm (hstr): New variable.


[-- Attachment #2: shellutils.scm - add hstr --]
[-- Type: text/x-patch, Size: 2949 bytes --]

diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm
index 650fe98ef..b4572f074 100644
--- a/gnu/packages/shellutils.scm
+++ b/gnu/packages/shellutils.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2016 Christopher Baines <mail@cbaines.net>
 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Benjamin Slade <slade@jnanam.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27,6 +28,10 @@
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages readline)
+  #:use-module (gnu packages pkg-config)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python))
@@ -158,3 +163,44 @@ fzy is designed to be used both as an editor plugin and on the command
 line.  Rather than clearing the screen, fzy displays its interface directly
 below the current cursor position, scrolling the screen if necessary.")
     (license expat)))
+
+(define-public hstr
+  (package
+    (name "hstr")
+    (version "2.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/dvorka/" name "/archive/"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "0yk2008bl48hv0v3c90ngq4y45h3nxif2ik6s3l7kag1zs5yv4wd"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'build
+           (lambda* (#:key make-flags outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (substitute* "src/include/hstr_curses.h"
+                 (("ncursesw\\/curses.h") "ncurses.h"))
+               (substitute* "src/include/hstr.h"
+                 (("ncursesw\\/curses.h") "ncurses.h")))
+             (invoke "make")
+             #t)))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("pkg-config" ,pkg-config)
+       ("ncurses" ,ncurses)
+       ("readline" ,readline)))
+    (synopsis "Navigate and search command history with shell history suggest box")
+    (description "HSTR (HiSToRy) is a command line utility that brings improved
+Bash/zsh command completion from the history.  It aims to make completion easier
+and more efficient than Ctrl-R.  Easily view, navigate and search your command
+history with shell history suggest box for Bash and zsh.  HSTR can also manage
+your command history (for instance you can remove commands that are obsolete
+or contain a piece of sensitive information) or bookmark your favourite
+commands.")
+    (home-page "http://me.mindforger.com/projects/hh.html")
+    (license asl2.0)))

[-- Attachment #3: Type: text/plain, Size: 247 bytes --]


-- 
Benjamin Slade - https://babbagefiles.xyz
  `(pgp_fp: ,(21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19))
    '(sent by mu4e on Emacs running under GNU/Linux . https://gnu.org )
       `(Choose Linux ,(Choose Freedom) . https://linux.com )

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#32662: shellutils.scm - add hstr
  2018-09-08  3:17 [bug#32662] shellutils.scm - add hstr Benjamin Slade
@ 2018-09-10 13:28 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2018-09-10 13:28 UTC (permalink / raw)
  To: Benjamin Slade; +Cc: 32662-done

[-- Attachment #1: Type: text/plain, Size: 457 bytes --]

Hello,

Benjamin Slade <slade@jnanam.net> skribis:

> gnu: Add hstr
>
> * gnu/packages/shellutils.scm (hstr): New variable.

Applied with the changes below: readline and ncurses go to ‘inputs’, not
‘native-inputs’; added ‘file-name’ as suggested by ‘guix lint’; made
full sentences in the description.

In the future could you please send the patch as produced by ‘git
format-patch’?

Thanks for the patch!

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2583 bytes --]

diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm
index b4572f074..425713a91 100644
--- a/gnu/packages/shellutils.scm
+++ b/gnu/packages/shellutils.scm
@@ -174,33 +174,34 @@ below the current cursor position, scrolling the screen if necessary.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0yk2008bl48hv0v3c90ngq4y45h3nxif2ik6s3l7kag1zs5yv4wd"))))
+                "0yk2008bl48hv0v3c90ngq4y45h3nxif2ik6s3l7kag1zs5yv4wd"))
+              (file-name (string-append name "-" version ".tar.gz"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (replace 'build
+         (add-before 'build 'adjust-ncurses-includes
            (lambda* (#:key make-flags outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
                (substitute* "src/include/hstr_curses.h"
                  (("ncursesw\\/curses.h") "ncurses.h"))
                (substitute* "src/include/hstr.h"
                  (("ncursesw\\/curses.h") "ncurses.h")))
-             (invoke "make")
              #t)))))
     (native-inputs
      `(("autoconf" ,autoconf)
        ("automake" ,automake)
-       ("pkg-config" ,pkg-config)
-       ("ncurses" ,ncurses)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("ncurses" ,ncurses)
        ("readline" ,readline)))
     (synopsis "Navigate and search command history with shell history suggest box")
-    (description "HSTR (HiSToRy) is a command line utility that brings improved
-Bash/zsh command completion from the history.  It aims to make completion easier
-and more efficient than Ctrl-R.  Easily view, navigate and search your command
-history with shell history suggest box for Bash and zsh.  HSTR can also manage
-your command history (for instance you can remove commands that are obsolete
-or contain a piece of sensitive information) or bookmark your favourite
-commands.")
+    (description "HSTR (HiSToRy) is a command-line utility that brings
+improved Bash and Zsh command completion from the history.  It aims to make
+completion easier and more efficient than with @kbd{Ctrl-R}.  It allows you to
+easily view, navigate, and search your command history with suggestion boxes.
+HSTR can also manage your command history (for instance you can remove
+commands that are obsolete or contain a piece of sensitive information) or
+bookmark your favourite commands.")
     (home-page "http://me.mindforger.com/projects/hh.html")
     (license asl2.0)))

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-10 13:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-08  3:17 [bug#32662] shellutils.scm - add hstr Benjamin Slade
2018-09-10 13:28 ` bug#32662: " Ludovic Courtès

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).