Subject: bug#41950: closed (Re: [bug#41950] gnu: Add poke.)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 21 Jun 2020 09:09:02 +0000

Your bug report

#41950: gnu: Add poke.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
41950: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41950
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#41950] gnu: Add poke.
From: Mathieu Othacehe <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Sun, 21 Jun 2020 11:08:43 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hey,

> Anyway, I am still somewhat new to packaging, so let me know if I missed
> anything obvious.

No, everything looks fine :) I fixed a small indentation mistake and
pushed!

Thanks,

Mathieu

Subject: gnu: Add poke.
From: [email-masked]
To: [email-masked]
Date: Fri, 19 Jun 2020 23:17:13 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

This was recently announced on one of the mailing lists. There aren't any
tagged releases yet, but I got it packaged up with the latest commit.

It ended up taking quite a bit of patching to get working, but luckily I was
able to work closely with upstream and they merged these in.

Anyway, I am still somewhat new to packaging, so let me know if I missed
anything obvious.

Cheers,

From 872d169241885a6a95804f58585ac1a1c5e9d650 Mon Sep 17 00:00:00 2001
From: "B. Wilson" <[email-masked]>
Date: Fri, 19 Jun 2020 23:08:40 +0900
Subject: [PATCH] gnu: Add poke.
To: [email-masked]

* gnu/packages/engineering.scm (poke): New variable.
* gnu/packages/bison.scm (bison-3.6): New variable.
---
 gnu/packages/bison.scm       | 13 +++++++
 gnu/packages/engineering.scm | 68 ++++++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+)

diff --git a/gnu/packages/bison.scm b/gnu/packages/bison.scm
index ae8d1a141b..63b14c7059 100644
--- a/gnu/packages/bison.scm
+++ b/gnu/packages/bison.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2012, 2013, 2015, 2019 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <[email-masked]>
 ;;; Copyright © 2019 Efraim Flashner <[email-masked]>
+;;; Copyright © 2020 B. Wilson <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -64,6 +65,18 @@ grammar.  It is versatile enough to have many applications, from parsers for
 simple tools through complex programming languages.")
     (license gpl3+)))
 
+(define-public bison-3.6
+  (package
+    (inherit bison)
+    (name "bison-3.6")
+    (version "3.6.3")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "mirror://gnu/bison/bison-" version ".tar.xz"))
+      (sha256
+       (base32 "0gdpnjh6ra9xa9vj6hzjdf0c04x4pjyy8vssm3qdb7fya4v7knq6"))))))
+
 (define-public bison-3.0
   (package
     (inherit bison)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index edbaa5bf63..eebc019d26 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -18,6 +18,7 @@
 ;;; Copyright © 2020 Vincent Legoll <[email-masked]>
 ;;; Copyright © 2020 Marius Bakke <[email-masked]>
 ;;; Copyright © 2020 Ekaitz Zarraga <[email-masked]>
+;;; Copyright © 2020 B. Wilson <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -54,6 +55,7 @@
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bdw-gc)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
@@ -61,6 +63,7 @@
   #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages dejagnu)
   #:use-module (gnu packages digest)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages flex)
@@ -85,8 +88,10 @@
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages linux)               ;FIXME: for pcb
+  #:use-module (gnu packages lisp)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages maths)
+  #:use-module (gnu packages man)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages mpi)
   #:use-module (gnu packages ncurses)
@@ -103,6 +108,7 @@
   #:use-module (gnu packages tls)
   #:use-module (gnu packages tex)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages web)
   #:use-module (gnu packages wxwidgets)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages openkinect)
@@ -2676,3 +2682,65 @@ proper, a versatile program with a graphical user interface, and meshlabserver,
 a program that can perform mesh processing tasks in batch mode, without a
 GUI.")
     (license license:gpl3+)))
+
+(define-public poke
+  ;; Upstream has yet to tag any releases.
+  (let ((commit "d33317a46e3b7c48130a471a48cbfea1abab70d8")
+        (revision "0"))
+    (package
+      (name "poke")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "git://git.savannah.gnu.org/poke.git")
+               (commit commit)
+               (recursive? #t)))
+         (sha256
+          (base32 "1dd0r1x123bqi78lrsk58rvg9c9wka0kywdyzn7g3i4hkh54xb7d"))
+         (file-name (git-file-name name version))))
+      (build-system gnu-build-system)
+      ;; The GUI, which we elide, requires tcl and tk.
+      (native-inputs `(("autoconf" ,autoconf)
+                       ("automake" ,automake)
+                       ;; Requires bison 3.6+ but we currently only have 3.5.
+                       ;; Bison 3.6 will be available in the next core update.
+                       ("bison-3.6" ,bison-3.6)
+                       ("clisp" ,clisp)
+                       ("dejagnu" ,dejagnu)
+                       ("flex" ,flex)
+                       ("gettext" ,gettext-minimal)
+                       ("help2man" ,help2man)
+                       ("libtool" ,libtool)
+                       ("perl" ,perl)
+                       ("pkg-config" ,pkg-config)
+                       ("python-2" ,python-2)
+                       ("python-3" ,python-3)
+                       ("texinfo" ,texinfo)))
+      ;; FIXME: Enable NBD support by adding `libnbd' (currently unpackaged).
+      ;; FIXME: A "hyperlinks-capable" `libtexststyle' needed for the hserver.
+      (inputs `(("json-c" ,json-c)
+                ("libgc" ,libgc)
+                ("readline" ,readline)))
+      (arguments
+       ;; To build the GUI, add the `--enable-gui' configure flag.
+       ;; To enable the "hyperlink server", add the `--enable-hserver' flag.
+       `(#:configure-flags '("--enable-mi")
+         #:phases (modify-phases %standard-phases
+                    ;; This is a non-trivial bootstrap that needs many of the
+                    ;; native-inputs and thus must run after `patch-shebangs'.
+                    (delete 'bootstrap)
+                    (add-after 'patch-source-shebangs 'bootstrap
+                      (lambda _
+                        (invoke "./bootstrap" "--no-git"
+                                              "--no-bootstrap-sync"
+                                              "--gnulib-srcdir=gnulib")
+                        #t)))))
+      (home-page "http://jemarch.net/poke.html")
+      (synopsis "Interactive, extensible editor for binary data")
+      (description "GNU poke is an interactive, extensible editor for binary
+  data.  Not limited to editing basic entities such as bits and bytes, it
+  provides a full-fledged procedural, interactive programming language designed
+  to describe data structures and to operate on them.")
+      (license license:gpl3+))))
-- 
2.27.0