From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:40624) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7tAq-0004wu-7N for guix-patches@gnu.org; Tue, 10 Sep 2019 23:20:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7tAo-0007MY-PR for guix-patches@gnu.org; Tue, 10 Sep 2019 23:20:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33100) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i7tAo-0007MO-Is for guix-patches@gnu.org; Tue, 10 Sep 2019 23:20:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i7tAo-000573-BM for guix-patches@gnu.org; Tue, 10 Sep 2019 23:20:02 -0400 Subject: [bug#37365] [PATCH] - Amendment: Enable tests References: <87tv9k3ks0.fsf@rekahsoft.ca> In-Reply-To: <87tv9k3ks0.fsf@rekahsoft.ca> Resent-Message-ID: From: "Collin J. Doering" Date: Tue, 10 Sep 2019 23:18:52 -0400 Message-ID: <87o8zr34gz.fsf@rekahsoft.ca> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 37365@debbugs.gnu.org --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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. =2D-=20 Collin J. Doering http://rekahsoft.ca http://blog.rekahsoft.ca http://git.rekahsoft.ca --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE+NVG868371PRtki+e03rkyErMCIFAl14Z5wACgkQe03rkyEr MCIDXQf+PXxekq8j+898+BhG0HVzqcvAAOu7jtOnezarjMH++87a/YbJueMo03x2 KP+FL64fh3/xclUVPF8dl8/YkY8gWXPEDrJGMiYf/3hCeDYuNdBBheAM0SmXVFSd T0W1snU2IAst9SAagi5UUdUNBcB5Bur2WW6ynlTx6K3kUwmgixnzmsiHE76GbUmR hHk6PNb27dLZe11vAlIh+rHHMeQyc4EOH1EdyrhZcQx4aHeDq2a03VA/Yqpf8ylg pIU6oJRnXmPkn4ge/uX5wuNH1kr/43pazOSOuVgCGBNVSfzwD2vSJ6lj1bvKUMia Il2rTwAjND8G7ZBNaGD95v680VpBQw== =ItTK -----END PGP SIGNATURE----- --==-=-=-- --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-Add-zsh-autosuggestions.patch Content-Transfer-Encoding: quoted-printable >From 67f7193f2d8c51c43146514944659f15b98c7104 Mon Sep 17 00:00:00 2001 From: "Collin J. Doering" 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 --- 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))) =20 +(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 =C2=A9 2017 Stefan Reich=C3=B6r ;;; Copyright =C2=A9 2018 Tobias Geerinckx-Rice ;;; Copyright =C2=A9 2018 Benjamin Slade +;;; Copyright =C2=A9 2019 Collin J. Doering ;;; ;;; 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)) =20 +(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/z= sh-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 com= mands as you type.") + (home-page "https://github.com/zsh-users/zsh-autosuggestions.git") + (license license:expat))) + (define-public envstore (package (name "envstore") --=20 2.23.0 --=-=-=--