From: Jan Nieuwenhuizen <janneke@gnu.org>
To: Matt Wette <matt.wette@gmail.com>
Cc: guile-user@gnu.org
Subject: Re: Nyacc patches for Mes to avoid bundling?
Date: Mon, 08 May 2017 17:37:37 +0200 [thread overview]
Message-ID: <87lgq7e4vy.fsf@gnu.org> (raw)
In-Reply-To: <70FFAE28-410D-4D1A-AF9C-21FC52C895C2@gmail.com> (Matt Wette's message of "Sun, 7 May 2017 07:16:02 -0700")
[-- Attachment #1: Type: text/plain, Size: 408 bytes --]
Matt Wette writes:
> I have released a 0.78.1 with the following additions:
> 1) configure
> 2) README.nyacc => README, INSTALL
> 3) Makefile.in
Wow, great; that's real simple! I fixed two typos (see attached patch
1) and created a Guix[SD] package description in guix.scm (patch 2) that
I intend to submit for inclusion into Guix, so that I can unbundle
Nyacc from the Mes package.
Greetings,
janneke
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-configure-Makefile.in-typos.patch --]
[-- Type: text/x-patch, Size: 1207 bytes --]
From 15cc53ead5d95889f763a649228801734b4250e8 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Mon, 8 May 2017 07:20:55 +0200
Subject: [PATCH 1/2] Fix configure, Makefile.in typos.
* Makefile.in (SITE_SCM_GO_DIR): Typo, add missing continuation.
* configure (site_scm_go_dir): Typo: site-ccache-dir.
---
Makefile.in | 2 +-
configure | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 10dc383..9790245 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -18,7 +18,7 @@ install:
(cd module; \
make -f Makefile.nyacc GUILE=$(GUILE) \
SITE_SCM_DIR=$(SITE_SCM_DIR) \
- SITE_SCM_GO_DIR=$(SITE_SCM_GO_DIR)
+ SITE_SCM_GO_DIR=$(SITE_SCM_GO_DIR) \
install)
install-srcs:
diff --git a/configure b/configure
index 857beda..7541e94 100755
--- a/configure
+++ b/configure
@@ -70,7 +70,7 @@ fi
if [ "X$site_scm_go_dir" == "X" ]; then
if [ "X$prefix" == "X" ]; then
- SITE_SCM_GO_DIR=`$GUILE -c '(display (%site-cache-dir))'`
+ SITE_SCM_GO_DIR=`$GUILE -c '(display (%site-ccache-dir))'`
else
EFF_VER=`$GUILE -c "(display (effective-version))"`
SITE_SCM_GO_DIR=$prefix/lib/guile/$EFF_VER/site-ccache
--
2.12.2
[-- Attachment #3: 0002-Add-guix-package.patch --]
[-- Type: text/x-patch, Size: 4454 bytes --]
From 35e9b3d639d97e9d615487766f0db245596452da Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Mon, 8 May 2017 17:31:52 +0200
Subject: [PATCH 2/2] Add guix package.
* guix.scm: New file. Enables to setup a build environment, build and
install for Guix from git.
---
guix.scm | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 109 insertions(+)
create mode 100644 guix.scm
diff --git a/guix.scm b/guix.scm
new file mode 100644
index 0000000..9e846ef
--- /dev/null
+++ b/guix.scm
@@ -0,0 +1,109 @@
+;;; guix.scm -- Guix package definition
+
+;;; NYACC (Not Yet Another Compiler Compiler!)
+;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
+
+;;; Also borrowing code from:
+;;; guile-sdl2 --- FFI bindings for SDL2
+;;; Copyright © 2015 David Thompson <davet@gnu.org>
+
+;;; This library is free software; you can redistribute it and/or
+;;; modify it under the terms of the GNU Lesser General Public
+;;; License as published by the Free Software Foundation; either
+;;; version 3 of the License, or (at your option) any later version.
+;;;
+;;; This library is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;;; Lesser General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU Lesser General Public License
+;;; along with this library; if not, see <http://www.gnu.org/licenses/>
+
+;;; Commentary:
+;;
+;; GNU Guix development package. To build and install, run:
+;;
+;; guix package -f guix.scm
+;;
+;; To build it, but not install it, run:
+;;
+;; guix build -f guix.scm
+;;
+;; To use as the basis for a development environment, run:
+;;
+;; guix environment -l guix.scm
+;;
+;;; Code:
+
+(use-modules (srfi srfi-1)
+ (srfi srfi-26)
+ (ice-9 match)
+ (ice-9 popen)
+ (ice-9 rdelim)
+ (gnu packages)
+ (gnu packages guile)
+ ((guix build utils) #:select (with-directory-excursion))
+ (guix build-system gnu)
+ (guix gexp)
+ (guix download)
+ (guix licenses)
+ (guix packages))
+
+(define %source-dir (dirname (current-filename)))
+
+(define git-file?
+ (let* ((pipe (with-directory-excursion %source-dir
+ (open-pipe* OPEN_READ "git" "ls-files")))
+ (files (let loop ((lines '()))
+ (match (read-line pipe)
+ ((? eof-object?)
+ (reverse lines))
+ (line
+ (loop (cons line lines))))))
+ (status (close-pipe pipe)))
+ (lambda (file stat)
+ (match (stat:type stat)
+ ('directory #t)
+ ((or 'regular 'symlink)
+ (any (cut string-suffix? <> file) files))
+ (_ #f)))))
+
+(define-public nyacc
+ (package
+ (name "nyacc")
+ (version "0.78.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://download.savannah.gnu.org/releases/nyacc/"
+ name "-" version ".tar.gz"))
+ (patches (search-patches "0001-Fix-configure-Makefile.in-typos.patch"))
+ (sha256
+ (base32 "01grl34za9avzbawvwgx8m2c1mjmjyafkbv5j366h6vyhm8ghdxy"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("guile" ,guile-2.2)))
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (add-before 'configure 'setenv
+ (lambda _
+ ;; quiet warnings
+ (setenv "GUILE_AUTO_COMPILE" "0")
+ #t)))))
+ (synopsis "a LALR(1) Parser Generator in Guile")
+ (description
+ "NYACC is a LALR(1) Parser Generator Implemented in Guile.
+The syntax and nomenclature should be considered not stable.")
+ (home-page "")
+ (license (list gpl3+ lgpl3+))))
+
+(define nyacc.git
+ (package
+ (inherit nyacc)
+ (name "nyacc.git")
+ (version "git")
+ (source (local-file %source-dir #:recursive? #t #:select? git-file?))))
+
+;; Return it here so `guix build/environment/package' can consume it directly.
+nyacc.git
--
2.12.2
[-- Attachment #4: Type: text/plain, Size: 154 bytes --]
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl
next prev parent reply other threads:[~2017-05-08 15:37 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-03 17:59 Nyacc patches for Mes to avoid bundling? Jan Nieuwenhuizen
2017-05-04 0:07 ` Matt Wette
2017-05-05 2:09 ` Matt Wette
2017-05-05 6:07 ` Jan Nieuwenhuizen
2017-05-05 12:44 ` Matt Wette
2017-05-05 13:33 ` Jan Nieuwenhuizen
2017-05-05 22:59 ` Matt Wette
2017-05-06 15:21 ` Matt Wette
2017-05-06 16:00 ` Jan Nieuwenhuizen
2017-05-06 16:21 ` Matt Wette
2017-05-06 16:33 ` Jan Nieuwenhuizen
2017-05-07 7:54 ` Jan Nieuwenhuizen
2017-05-07 14:16 ` Matt Wette
2017-05-08 15:37 ` Jan Nieuwenhuizen [this message]
2017-05-10 21:01 ` Jan Nieuwenhuizen
2017-05-11 0:21 ` Matt Wette
2017-05-12 3:52 ` Matt Wette
2017-05-12 6:00 ` Jan Nieuwenhuizen
2017-05-12 15:10 ` Matt Wette
2017-05-05 13:19 ` Ludovic Courtès
2017-05-05 19:56 ` Jan Nieuwenhuizen
2017-05-05 20:22 ` Ludovic Courtès
2017-05-06 15:49 ` Jan Nieuwenhuizen
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://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lgq7e4vy.fsf@gnu.org \
--to=janneke@gnu.org \
--cc=guile-user@gnu.org \
--cc=matt.wette@gmail.com \
/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.
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).