From: "Collin J. Doering" <collin@rekahsoft.ca>
To: 37365@debbugs.gnu.org
Subject: [bug#37365] [PATCH] - Amendment: Enable tests
Date: Tue, 10 Sep 2019 23:18:52 -0400 [thread overview]
Message-ID: <87o8zr34gz.fsf@rekahsoft.ca> (raw)
In-Reply-To: <87tv9k3ks0.fsf@rekahsoft.ca>
[-- Attachment #1.1: Type: text/plain, Size: 304 bytes --]
Enable tests for zsh-autosuggetions. These tests use tmux, zsh, and ruby
with rspec, inspecting output after simulating input.
Many thanks to rekado for his advise on IRC.
This is ready to merge.
--
Collin J. Doering
http://rekahsoft.ca
http://blog.rekahsoft.ca
http://git.rekahsoft.ca
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
[-- Attachment #2: 0001-gnu-Add-zsh-autosuggestions.patch --]
[-- Type: text/x-patch, Size: 4656 bytes --]
From 67f7193f2d8c51c43146514944659f15b98c7104 Mon Sep 17 00:00:00 2001
From: "Collin J. Doering" <collin@rekahsoft.ca>
Date: Tue, 10 Sep 2019 22:58:32 -0400
Subject: [PATCH] gnu: Add zsh-autosuggestions
* gnu/packages/shellutils.scm (zsh-autosuggestions): New variable.
* gnu/packages/ruby.scm (ruby-rspec-wait): New variable.
Signed-off-by: Collin J. Doering <collin@rekahsoft.ca>
---
gnu/packages/ruby.scm | 26 ++++++++++++++++++++
gnu/packages/shellutils.scm | 49 +++++++++++++++++++++++++++++++++++++
2 files changed, 75 insertions(+)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index ef9792bc0f..b953c51204 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -670,6 +670,32 @@ RSpec tests.")
(home-page "https://github.com/dblock/rspec-rerun")
(license license:expat)))
+(define-public ruby-rspec-wait
+ (package
+ (name "ruby-rspec-wait")
+ (version "0.0.9")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (rubygems-uri "rspec-wait" version))
+ (sha256
+ (base32
+ "0gvj1bp5ccx001dyvcgk2j49s5sl6vs9fdaqqb08z3bd1554hsww"))))
+ (build-system ruby-build-system)
+ (arguments
+ '(#:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (invoke "rake" "spec"))))))
+ (native-inputs
+ `(("bundler" ,bundler)))
+ (propagated-inputs `(("ruby-rspec" ,ruby-rspec)))
+ (synopsis "Wait for conditions in RSpec")
+ (description "Wait for conditions in RSpec")
+ (home-page
+ "https://github.com/laserlemon/rspec-wait")
+ (license license:expat)))
+
(define-public ruby-rspec
(package
(name "ruby-rspec")
diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm
index f7542ea759..420f946c83 100644
--- a/gnu/packages/shellutils.scm
+++ b/gnu/packages/shellutils.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Benjamin Slade <slade@jnanam.net>
+;;; Copyright © 2019 Collin J. Doering <collin@rekahsoft.ca>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -33,11 +34,59 @@
#:use-module (gnu packages ncurses)
#:use-module (gnu packages readline)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages ruby)
+ #:use-module (gnu packages tmux)
+ #:use-module (gnu packages shells)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
#:use-module (guix build-system python))
+(define-public zsh-autosuggestions
+ (package
+ (name "zsh-autosuggestions")
+ (version "0.6.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/zsh-users/zsh-autosuggestions.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1h8h2mz9wpjpymgl2p7pc146c1jgb3dggpvzwm9ln3in336wl95c"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("tmux" ,tmux)
+ ("zsh" ,zsh)
+ ("ruby" ,ruby)
+ ("ruby-rspec" ,ruby-rspec)
+ ("ruby-rspec-wait" ,ruby-rspec-wait)
+ ("ruby-pry" ,ruby-pry)
+ ("ruby-byebug" ,ruby-byebug)))
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'check ; Tests use ruby's bundler; instead execute rspec directly
+ (lambda _
+ (setenv "TMUX_TMPDIR" (getenv "TMPDIR"))
+ (setenv "SHELL" (which "zsh"))
+ (invoke "rspec")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (install-path (string-append out "/share/zsh/plugins/zsh-autosuggestions")))
+ (mkdir-p install-path)
+ (invoke "make" "all")
+ (copy-file "zsh-autosuggestions.zsh" (string-append install-path "/zsh-autosuggestions.zsh"))
+ #t))))))
+ (synopsis "Fish-like autosuggestions for zsh")
+ (description
+ "Fish-like fast/unobtrusive autosuggestions for zsh. It suggests commands as you type.")
+ (home-page "https://github.com/zsh-users/zsh-autosuggestions.git")
+ (license license:expat)))
+
(define-public envstore
(package
(name "envstore")
--
2.23.0
next prev parent reply other threads:[~2019-09-11 3:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-10 3:14 [bug#37365] [PATCH] Add package zsh-autosuggestions Collin J. Doering
2019-09-10 3:27 ` [bug#37365] [PATCH] Ammendment - zsh-autosuggestions Collin J. Doering
2019-09-10 14:37 ` [bug#37365] [PATCH] - Amendment #2: and copyright line and sign message with gpg Collin J. Doering
2019-09-11 3:18 ` Collin J. Doering [this message]
2019-09-11 7:37 ` [bug#37365] [PATCH] - Amendment: Enable tests Efraim Flashner
2019-09-12 21:15 ` Collin J. Doering
2019-09-13 12:47 ` bug#37365: " Efraim Flashner
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=87o8zr34gz.fsf@rekahsoft.ca \
--to=collin@rekahsoft.ca \
--cc=37365@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).