summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorPierre Langlois <pierre.langlois@gmx.com>2018-12-18 21:17:16 +0000
committerChristopher Lemmer Webber <cwebber@dustycloud.org>2018-12-19 09:45:39 -0500
commitdba83d7d14f8649932ed9e9900fbc8421ed39858 (patch)
tree793abdf4c7ecf3c4132daf0620dbf916f0a9e4cd /gnu/packages
parent38abef124bc18d3834eb12352a974b6143f62e97 (diff)
downloadguix-dba83d7d14f8649932ed9e9900fbc8421ed39858.tar.gz
gnu: stumpwm: Fix gnew command.
The new release of StumpWM broken the interactive 'gnew' command.  It was
fixed upstream [0] and will be part of the next release.

0: https://github.com/stumpwm/stumpwm/pull/538

* gnu/packages/patches/stumpwm-fix-broken-read-one-line.patch: New file.
* gnu/packages/lisp.scm (stumpwm)[source]: Use it.
* gnu/local.mk (dist_patch_DATA): Register it.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/lisp.scm4
-rw-r--r--gnu/packages/patches/stumpwm-fix-broken-read-one-line.patch45
2 files changed, 48 insertions, 1 deletions
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index d8da2951df..e4669e34f4 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -976,7 +976,9 @@ from other CLXes around the net.")
                     version ".tar.gz"))
               (sha256
                (base32 "177gxfk4c127i9crghx6fmkipznhgylvzgnjb2pna38g21gg6s39"))
-              (file-name (string-append "stumpwm-" version ".tar.gz"))))
+              (file-name (string-append "stumpwm-" version ".tar.gz"))
+              (patches
+               (search-patches "stumpwm-fix-broken-read-one-line.patch"))))
     (build-system asdf-build-system/sbcl)
     (native-inputs `(("fiasco" ,sbcl-fiasco)))
     (inputs `(("cl-ppcre" ,sbcl-cl-ppcre)
diff --git a/gnu/packages/patches/stumpwm-fix-broken-read-one-line.patch b/gnu/packages/patches/stumpwm-fix-broken-read-one-line.patch
new file mode 100644
index 0000000000..f8dac61307
--- /dev/null
+++ b/gnu/packages/patches/stumpwm-fix-broken-read-one-line.patch
@@ -0,0 +1,45 @@
+From a13db62a4da06426cf2eb2376d1a3723b5ee52d5 Mon Sep 17 00:00:00 2001
+From: Vasily Postnicov <shamaz.mazum@gmail.com>
+Date: Fri, 14 Dec 2018 20:01:53 +0300
+Subject: [PATCH] READ-ONE-LINE: Turn COMPLETIONS into a keyword argument
+
+This keeps READ-ONE-line backwards compatible to changes prior
+dae0422811771d179077b9336618f2b19be85b7b. Currently both
+ARGUMENT-POP-OR-READ and ARGUMENT-POP-REST-OR-READ are still being
+called with the previous lambda list. Update the calls to the
+READ-ONE-LINE that used the 'new' lambda list, COMPLETING-READ and
+YES-OR-NO-P.
+
+Closes #538
+---
+ input.lisp | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/input.lisp b/input.lisp
+index b698a368..7904b35f 100644
+--- a/input.lisp
++++ b/input.lisp
+@@ -307,10 +307,13 @@ passed the substring to complete on and is expected to return a list
+ of matches. If require-match argument is non-nil then the input must
+ match with an element of the completions."
+   (check-type completions (or list function symbol))
+-  (let ((line (read-one-line screen prompt completions :initial-input initial-input :require-match require-match)))
++  (let ((line (read-one-line screen prompt
++                             :completions completions
++                             :initial-input initial-input
++                             :require-match require-match)))
+     (when line (string-trim " " line))))
+ 
+-(defun read-one-line (screen prompt completions &key (initial-input "") require-match password)
++(defun read-one-line (screen prompt &key completions (initial-input "") require-match password)
+   "Read a line of input through stumpwm and return it. Returns nil if the user aborted."
+   (let ((*input-last-command* nil)
+         (*input-completions* completions)
+@@ -842,6 +845,7 @@ user presses 'y'"
+ user presses 'yes'"
+   (loop for line = (read-one-line (current-screen)
+                                   (format nil "~a(yes or no) " message)
++                                  :completions
+                                   '("yes" "no"))
+         until (find line '("yes" "no") :test 'string-equal)
+         do (message "Please answer yes or no")