guix: Update packaging.
* build-aux/manifest.scm (string-append): * guix/git/mes.scm (nyacc, git-file?): Remove. (mescc-tools): Bump to 0.6.0. (%source-dir): New variable. (mes.git): Ues it. * guix.scm: Rename from .guix.scm.
This commit is contained in:
parent
613bd96abe
commit
f33de25b96
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Mes --- Maxwell Equations of Software
|
||||
;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;; Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
|
||||
;;; This file is part of GNU Mes.
|
||||
;;;
|
||||
|
@ -17,6 +17,7 @@
|
|||
;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(use-modules (guix packages))
|
||||
(set! %load-path (cons "guix" %load-path))
|
||||
(include "../.guix.scm")
|
||||
(define %source-dir (dirname (dirname (current-filename))))
|
||||
(add-to-load-path (string-append %source-dir "/guix"))
|
||||
(use-modules (git mes))
|
||||
(packages->manifest (map cadr (package-direct-inputs mes)))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;; .guix.scm -- Guix package definition
|
||||
;;; guix.scm -- Guix package definition
|
||||
|
||||
;;; GNU Mes --- Maxwell Equations of Software
|
||||
;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;; Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Mes.
|
||||
;;;
|
||||
|
@ -22,19 +22,21 @@
|
|||
;;
|
||||
;; GNU Guix development package. To build and install, run:
|
||||
;;
|
||||
;; guix package -f .guix.scm
|
||||
;; guix package -f guix.scm
|
||||
;;
|
||||
;; To build it, but not install it, run:
|
||||
;;
|
||||
;; guix build -f .guix.scm
|
||||
;; guix build -f guix.scm
|
||||
;;
|
||||
;; To use as the basis for a development environment, run:
|
||||
;;
|
||||
;; guix environment -l .guix.scm
|
||||
;; guix environment -l guix.scm
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
(set! %load-path (cons "guix" %load-path))
|
||||
(define %source-dir (dirname (current-filename)))
|
||||
(add-to-load-path (string-append %source-dir "/guix"))
|
||||
|
||||
(use-modules (git mes))
|
||||
|
||||
;; Return it here so `guix build/environment/package' can consume it directly.
|
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Mes --- Maxwell Equations of Software
|
||||
;;; Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;; Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Mes.
|
||||
;;;
|
||||
|
@ -39,7 +39,6 @@
|
|||
#:use-module (gnu packages version-control)
|
||||
#:use-module (gnu packages perl)
|
||||
#:use-module (gnu packages texinfo)
|
||||
#:use-module ((guix build utils) #:select (with-directory-excursion))
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (guix build-system trivial)
|
||||
#:use-module (guix gexp)
|
||||
|
@ -50,74 +49,35 @@
|
|||
|
||||
(define %source-dir (getcwd))
|
||||
|
||||
(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.86.0")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://savannah/nyacc/"
|
||||
name "-" version ".tar.gz"))
|
||||
(patches (search-patches "nyacc-binary-literals.patch"))
|
||||
(sha256
|
||||
(base32
|
||||
"0lkd9lyspvhxlfs0496gsllwinh62jk9wij6gpadvx9gwz6yavd9"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("guile" ,guile-2.2)))
|
||||
(synopsis "LALR(1) Parser Generator in Guile")
|
||||
(description
|
||||
"NYACC is an LALR(1) parser generator implemented in Guile.
|
||||
The syntax and nomenclature should be considered not stable. It comes with
|
||||
extensive examples, including parsers for the Javascript and C99 languages.")
|
||||
(home-page "https://savannah.nongnu.org/projects/nyacc")
|
||||
(license (list gpl3+ lgpl3+))))
|
||||
|
||||
(define-public mescc-tools
|
||||
(package
|
||||
(name "mescc-tools")
|
||||
(version "0.5.2")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "http://git.savannah.nongnu.org/cgit/"
|
||||
"mescc-tools.git/snapshot/"
|
||||
"mescc-tools-Release_" version
|
||||
".tar.gz"))
|
||||
(patches (search-patches "mescc-tools-boot.patch"))
|
||||
(file-name (string-append name "-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"01x7bhmgwyf6mc2g1hcvibhps98nllacqm4f0j5l51b1mbi18pc2"))))
|
||||
(version "0.6.0")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"http://git.savannah.nongnu.org/cgit/mescc-tools.git/snapshot/"
|
||||
name "-Release_" version
|
||||
".tar.gz"))
|
||||
(file-name (string-append name "-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"1dmni3q1l36n7y4dzpzqb60d970d8xmaznl88gaa4lhinkr4bl3i"))))
|
||||
(build-system gnu-build-system)
|
||||
(supported-systems '("i686-linux" "x86_64-linux"))
|
||||
(arguments
|
||||
`(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
|
||||
`(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
|
||||
"CC=gcc")
|
||||
#:test-target "test"
|
||||
#:phases (modify-phases %standard-phases
|
||||
(delete 'configure))))
|
||||
(synopsis "Tools for the full source bootstrapping process")
|
||||
(description
|
||||
"Mescc-tools is a collection of tools for use in a full source
|
||||
bootstrapping process. Currently consists of the M1 macro assembler and the
|
||||
hex2 linker.")
|
||||
(home-page "https://github.com/oriansj/mescc-tools")
|
||||
bootstrapping process. It consists of the M1 macro assembler, the hex2
|
||||
linker, the blood-elf symbol table generator, the kaem shell, exec_enable and
|
||||
get_machine.")
|
||||
(home-page "https://savannah.nongnu.org/projects/mescc-tools")
|
||||
(license gpl3+)))
|
||||
|
||||
(define-public mes
|
||||
|
@ -177,4 +137,6 @@ Guile.")
|
|||
(inherit mes)
|
||||
(name "mes.git")
|
||||
(version (string-append version "-" revision "." (string-take commit 7)))
|
||||
(source (local-file %source-dir #:recursive? #t #:select? git-file?)))))
|
||||
(source (local-file %source-dir
|
||||
#:recursive? #t
|
||||
#:select? (git-predicate %source-dir))))))
|
||||
|
|
|
@ -1,222 +0,0 @@
|
|||
From c184e95096881a13f29ebd7fc507fe305d3d8de5 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Nieuwenhuizen <janneke@gnu.org>
|
||||
Date: Thu, 4 Oct 2018 22:03:31 +0200
|
||||
Subject: [PATCH] build.sh: Update for mes 0.18.
|
||||
|
||||
---
|
||||
build.sh | 92 +++++++++++++++++++++++++++++++++++++-----------------
|
||||
install.sh | 6 ++--
|
||||
2 files changed, 66 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/build.sh b/build.sh
|
||||
index 335a7bb..19a0029 100755
|
||||
--- a/build.sh
|
||||
+++ b/build.sh
|
||||
@@ -18,7 +18,8 @@
|
||||
# along with mescc-tools. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set -eux
|
||||
-MES_SEED=${MES_SEED-../mescc-tools-seed/libs}
|
||||
+MES_PREFIX=${MES_PREFIX-../mes}
|
||||
+MES_SEED=${MES_SEED-../mes-seed}
|
||||
MESCC_TOOLS_SEED=${MESCC_TOOLS_SEED-../mescc-tools-seed}
|
||||
|
||||
#########################################
|
||||
@@ -32,15 +33,23 @@ MESCC_TOOLS_SEED=${MESCC_TOOLS_SEED-../mescc-tools-seed}
|
||||
# blood-elf
|
||||
# Create proper debug segment
|
||||
$MESCC_TOOLS_SEED/blood-elf\
|
||||
+ -f $MESCC_TOOLS_SEED/file_print.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/match.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/string.M1\
|
||||
-f $MESCC_TOOLS_SEED/blood-elf.M1\
|
||||
-o blood-elf-blood-elf-footer.M1
|
||||
|
||||
# Build
|
||||
# M1-macro phase
|
||||
$MESCC_TOOLS_SEED/M1 --LittleEndian --Architecture 1\
|
||||
- -f $MES_SEED/x86.M1\
|
||||
- -f $MES_SEED/crt1.M1\
|
||||
- -f $MES_SEED/libc+tcc-mes.M1\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/x86.M1\
|
||||
+ -f $MES_SEED/x86-mes/crt1.S\
|
||||
+ -f $MES_SEED/x86-mes/libc+tcc.S\
|
||||
+ -f $MESCC_TOOLS_SEED/file_print.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/match.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/string.M1\
|
||||
-f $MESCC_TOOLS_SEED/blood-elf.M1\
|
||||
-f blood-elf-blood-elf-footer.M1\
|
||||
-o blood-elf.hex2
|
||||
@@ -49,7 +58,7 @@ $MESCC_TOOLS_SEED/hex2\
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
--BaseAddress 0x1000000\
|
||||
- -f $MES_SEED/elf32-header.hex2\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
|
||||
-f blood-elf.hex2\
|
||||
--exec_enable\
|
||||
-o bin/blood-elf
|
||||
@@ -65,9 +74,13 @@ $MESCC_TOOLS_SEED/hex2\
|
||||
$MESCC_TOOLS_SEED/M1 \
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
- -f $MES_SEED/x86.M1\
|
||||
- -f $MES_SEED/crt1.M1\
|
||||
- -f $MES_SEED/libc+tcc-mes.M1\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/x86.M1\
|
||||
+ -f $MES_SEED/x86-mes/crt1.S\
|
||||
+ -f $MES_SEED/x86-mes/libc+tcc.S\
|
||||
+ -f $MESCC_TOOLS_SEED/file_print.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/match.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/string.M1\
|
||||
-f $MESCC_TOOLS_SEED/M1.M1\
|
||||
-f M1-footer.M1\
|
||||
-o M1.hex2
|
||||
@@ -76,7 +89,7 @@ $MESCC_TOOLS_SEED/hex2 \
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
--BaseAddress 0x1000000\
|
||||
- -f $MES_SEED/elf32-header.hex2\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
|
||||
-f M1.hex2\
|
||||
--exec_enable\
|
||||
-o bin/M1
|
||||
@@ -92,9 +105,13 @@ $MESCC_TOOLS_SEED/hex2 \
|
||||
./bin/M1 \
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
- -f $MES_SEED/x86.M1\
|
||||
- -f $MES_SEED/crt1.M1\
|
||||
- -f $MES_SEED/libc+tcc-mes.M1\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/x86.M1\
|
||||
+ -f $MES_SEED/x86-mes/crt1.S\
|
||||
+ -f $MES_SEED/x86-mes/libc+tcc.S\
|
||||
+ -f $MESCC_TOOLS_SEED/file_print.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/match.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/string.M1\
|
||||
-f $MESCC_TOOLS_SEED/hex2.M1\
|
||||
-f hex2-footer.M1\
|
||||
-o hex2.hex2
|
||||
@@ -103,10 +120,10 @@ $MESCC_TOOLS_SEED/hex2 \
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
--BaseAddress 0x1000000\
|
||||
- -f $MES_SEED/elf32-header.hex2\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
|
||||
-f hex2.hex2\
|
||||
--exec_enable\
|
||||
- -o bin/hex2
|
||||
+ -o bin/hex2-0
|
||||
|
||||
#########################
|
||||
# Phase-1 Self-host #
|
||||
@@ -123,18 +140,22 @@ $MESCC_TOOLS_SEED/hex2 \
|
||||
./bin/M1 \
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
- -f $MES_SEED/x86.M1\
|
||||
- -f $MES_SEED/crt1.M1\
|
||||
- -f $MES_SEED/libc+tcc-mes.M1\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/x86.M1\
|
||||
+ -f $MES_SEED/x86-mes/crt1.S\
|
||||
+ -f $MES_SEED/x86-mes/libc+tcc.S\
|
||||
+ -f $MESCC_TOOLS_SEED/file_print.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/match.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/string.M1\
|
||||
-f $MESCC_TOOLS_SEED/blood-elf.M1\
|
||||
-f blood-elf-blood-elf-footer.M1\
|
||||
-o blood-elf.hex2
|
||||
# Hex2-linker phase
|
||||
-./bin/hex2 \
|
||||
+./bin/hex2-0 \
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
--BaseAddress 0x1000000\
|
||||
- -f $MES_SEED/elf32-header.hex2\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
|
||||
-f blood-elf.hex2\
|
||||
--exec_enable\
|
||||
-o blood-elf
|
||||
@@ -150,18 +171,22 @@ $MESCC_TOOLS_SEED/hex2 \
|
||||
./bin/M1 \
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
- -f $MES_SEED/x86.M1\
|
||||
- -f $MES_SEED/crt1.M1\
|
||||
- -f $MES_SEED/libc+tcc-mes.M1\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/x86.M1\
|
||||
+ -f $MES_SEED/x86-mes/crt1.S\
|
||||
+ -f $MES_SEED/x86-mes/libc+tcc.S\
|
||||
+ -f $MESCC_TOOLS_SEED/file_print.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/match.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/string.M1\
|
||||
-f $MESCC_TOOLS_SEED/M1.M1\
|
||||
-f M1-footer.M1\
|
||||
-o M1.hex2
|
||||
# Hex2-linker phase
|
||||
-./bin/hex2 \
|
||||
+./bin/hex2-0 \
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
--BaseAddress 0x1000000\
|
||||
- -f $MES_SEED/elf32-header.hex2\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
|
||||
-f M1.hex2\
|
||||
--exec_enable\
|
||||
-o bin/M1
|
||||
@@ -177,18 +202,27 @@ $MESCC_TOOLS_SEED/hex2 \
|
||||
./bin/M1 \
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
- -f $MES_SEED/x86.M1\
|
||||
- -f $MES_SEED/crt1.M1\
|
||||
- -f $MES_SEED/libc+tcc-mes.M1\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/x86.M1\
|
||||
+ -f $MES_SEED/x86-mes/crt1.S\
|
||||
+ -f $MES_SEED/x86-mes/libc+tcc.S\
|
||||
+ -f $MESCC_TOOLS_SEED/file_print.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/match.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/string.M1\
|
||||
-f $MESCC_TOOLS_SEED/hex2.M1\
|
||||
-f hex2-footer.M1\
|
||||
-o hex2.hex2
|
||||
# Hex2-linker phase
|
||||
-./bin/hex2 \
|
||||
+./bin/hex2-0 \
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
--BaseAddress 0x1000000\
|
||||
- -f $MES_SEED/elf32-header.hex2\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
|
||||
-f hex2.hex2\
|
||||
--exec_enable\
|
||||
-o bin/hex2
|
||||
+
|
||||
+# TODO
|
||||
+touch bin/exec_enable
|
||||
+touch bin/get_machine
|
||||
+touch bin/kaem
|
||||
diff --git a/install.sh b/install.sh
|
||||
index e4dccff..29e58d6 100644
|
||||
--- a/install.sh
|
||||
+++ b/install.sh
|
||||
@@ -18,6 +18,6 @@
|
||||
PREFIX=${PREFIX-usr}
|
||||
|
||||
mkdir -p "$PREFIX/bin"
|
||||
-cp blood-elf "$PREFIX/bin/blood-elf"
|
||||
-cp hex2 "$PREFIX/bin/hex2"
|
||||
-cp M1 "$PREFIX/bin/M1"
|
||||
+cp bin/blood-elf "$PREFIX/bin/blood-elf"
|
||||
+cp bin/hex2 "$PREFIX/bin/hex2"
|
||||
+cp bin/M1 "$PREFIX/bin/M1"
|
||||
--
|
||||
2.18.0
|
||||
|
Loading…
Reference in a new issue