| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 |
|
| 26 | (define-module (gnu packages mes)
|
| 27 | #:use-module (gnu packages)
|
| 28 | #:use-module (gnu packages base)
|
| 29 | #:use-module (gnu packages cross-base)
|
| 30 | #:use-module (gnu packages graphviz)
|
| 31 | #:use-module (gnu packages guile)
|
| 32 | #:use-module (gnu packages man)
|
| 33 | #:use-module (gnu packages perl)
|
| 34 | #:use-module (gnu packages pkg-config)
|
| 35 | #:use-module (gnu packages texinfo)
|
| 36 | #:use-module (guix build-system gnu)
|
| 37 | #:use-module (guix download)
|
| 38 | #:use-module (guix gexp)
|
| 39 | #:use-module (guix git-download)
|
| 40 | #:use-module (guix licenses)
|
| 41 | #:use-module (guix packages)
|
| 42 | #:use-module (guix utils))
|
| 43 |
|
| 44 | (define-public nyacc-1.08.1
|
| 45 | (package
|
| 46 | (name "nyacc")
|
| 47 | (version "1.08.1")
|
| 48 | (source (origin
|
| 49 | (method url-fetch)
|
| 50 | (uri (string-append "mirror://savannah/nyacc/nyacc-"
|
| 51 | version ".tar.gz"))
|
| 52 | (sha256
|
| 53 | (base32
|
| 54 | "1vrz3pnlr3njwk6ksz85slcwawi8ngiqbw94wd9x3mgv85vsfmys"))
|
| 55 | (modules '((guix build utils)))
|
| 56 | (snippet
|
| 57 | '(substitute* "configure"
|
| 58 | (("GUILE_GLOBAL_SITE=\\$prefix.*")
|
| 59 | "GUILE_GLOBAL_SITE=\
|
| 60 | $prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION\n")))))
|
| 61 | (build-system gnu-build-system)
|
| 62 | (native-inputs (list pkg-config))
|
| 63 | (inputs (list guile-3.0))
|
| 64 | (propagated-inputs (list guile-bytestructures))
|
| 65 | (home-page "https://savannah.nongnu.org/projects/nyacc")
|
| 66 | (synopsis "LALR(1) Parser Generator in Guile")
|
| 67 | (description
|
| 68 | "@acronym{NYACC, Not Yet Another Compiler Compiler} is set of Guile modules
|
| 69 | for generating parsers and lexical analyzers. It provides sample parsers,
|
| 70 | pretty-printers using SXML trees as an intermediate representation, a decent C
|
| 71 | parser and an `FFI Helper' tool to help create Guile Scheme bindings for C-based
|
| 72 | libraries. It also provides (partially implemented) compilers based on these
|
| 73 | parsers to allow execution with Guile as extension languages.")
|
| 74 | (license (list gpl3+ lgpl3+))))
|
| 75 |
|
| 76 | (define-public nyacc-1.00.2
|
| 77 | |
| 78 | |
| 79 | (package
|
| 80 | (inherit nyacc-1.08.1)
|
| 81 | (version "1.00.2")
|
| 82 | (source (origin
|
| 83 | (method url-fetch)
|
| 84 | (uri (string-append "mirror://savannah/nyacc/nyacc-"
|
| 85 | version ".tar.gz"))
|
| 86 | (modules '((guix build utils)))
|
| 87 | (snippet
|
| 88 | '(begin
|
| 89 | (substitute* (find-files "." "^Makefile\\.in$")
|
| 90 | (("^SITE_SCM_DIR =.*")
|
| 91 | "SITE_SCM_DIR = \
|
| 92 | @prefix@/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
|
| 93 | (("^SITE_SCM_GO_DIR =.*")
|
| 94 | "SITE_SCM_GO_DIR = \
|
| 95 | @prefix@/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")
|
| 96 | (("^INFODIR =.*")
|
| 97 | "INFODIR = @prefix@/share/info\n")
|
| 98 | (("^DOCDIR =.*")
|
| 99 | "DOCDIR = @prefix@/share/doc/$(PACKAGE_TARNAME)\n"))
|
| 100 | #t))
|
| 101 | (sha256
|
| 102 | (base32
|
| 103 | "065ksalfllbdrzl12dz9d9dcxrv97wqxblslngsc6kajvnvlyvpk"))))
|
| 104 |
|
| 105 | |
| 106 | |
| 107 | (propagated-inputs '())
|
| 108 |
|
| 109 | (inputs (list guile-3.0))))
|
| 110 |
|
| 111 | (define-public nyacc-2.02
|
| 112 | (package
|
| 113 | (inherit nyacc-1.00.2)
|
| 114 | (version "2.02.5")
|
| 115 | (source (origin
|
| 116 | (method url-fetch)
|
| 117 | (uri (string-append "mirror://savannah/nyacc/nyacc-"
|
| 118 | version ".tar.gz"))
|
| 119 | (sha256
|
| 120 | (base32
|
| 121 | "0wyrq9sc9j0yp34iwzsjfpz40503psbvd982vy8kx8ym99rn5w7r"))
|
| 122 | (modules '((guix build utils)))
|
| 123 | (snippet
|
| 124 | '(begin
|
| 125 | (substitute* "configure"
|
| 126 | (("GUILE_GLOBAL_SITE=\\$prefix.*")
|
| 127 | "GUILE_GLOBAL_SITE=\
|
| 128 | $prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION\n"))
|
| 129 | (substitute* "module/Makefile.in"
|
| 130 | (("@NYACC_FH_BS_BINS@") "$(NYACC_FH_BS_BINS)"))))))
|
| 131 | (propagated-inputs (list guile-bytestructures))))
|
| 132 |
|
| 133 | (define-public nyacc
|
| 134 | (package
|
| 135 | (inherit nyacc-2.02)
|
| 136 | (version "3.02.0")
|
| 137 | (source (origin
|
| 138 | (method url-fetch)
|
| 139 | (uri (string-append "mirror://savannah/nyacc/nyacc-"
|
| 140 | version ".tar.gz"))
|
| 141 | (sha256
|
| 142 | (base32
|
| 143 | "148hljzmikl68z8jzryrdmqy9ifgz5xmid2ggdxvbyb07iawx93g"))
|
| 144 | (modules '((guix build utils)))
|
| 145 | (snippet
|
| 146 | '(begin
|
| 147 | (substitute* "configure"
|
| 148 | (("GUILE_GLOBAL_SITE=\\$prefix.*")
|
| 149 | "GUILE_GLOBAL_SITE=\
|
| 150 | $prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION\n"))))))))
|
| 151 |
|
| 152 | (define-public mes
|
| 153 | (package
|
| 154 | (name "mes")
|
| 155 | (version "0.27.1")
|
| 156 | (source (origin
|
| 157 | (method url-fetch)
|
| 158 | (uri (string-append "mirror://gnu/mes/"
|
| 159 | "mes-" version ".tar.gz"))
|
| 160 | (sha256
|
| 161 | (base32
|
| 162 | "0pgjzlynfzdfq5xrxirvsrj4sdvnwq99s6xxwfhzhjga8zm40fhq"))))
|
| 163 | (supported-systems '("armhf-linux" "i686-linux"
|
| 164 | "x86_64-linux" "riscv64-linux"))
|
| 165 | (propagated-inputs (list mescc-tools nyacc-2.02))
|
| 166 | (native-inputs
|
| 167 | (append (list guile-3.0)
|
| 168 | (let ((target-system (or (%current-target-system)
|
| 169 | (%current-system))))
|
| 170 | (cond
|
| 171 | ((string-prefix? "x86_64-linux" target-system)
|
| 172 | |
| 173 | |
| 174 | (list (cross-binutils "i686-unknown-linux-gnu")
|
| 175 | (cross-gcc "i686-unknown-linux-gnu")))
|
| 176 | ((string-prefix? "aarch64-linux" target-system)
|
| 177 | |
| 178 | |
| 179 | (let ((triplet "arm-linux-gnueabihf"))
|
| 180 | (list (cross-binutils triplet) (cross-gcc triplet))))
|
| 181 | (else
|
| 182 | '())))
|
| 183 | (list graphviz help2man
|
| 184 | m2-planet
|
| 185 | perl |
| 186 | texinfo)))
|
| 187 | (build-system gnu-build-system)
|
| 188 | (arguments
|
| 189 | `(#:strip-binaries? #f)) |
| 190 | (native-search-paths
|
| 191 | (list (search-path-specification
|
| 192 | (variable "C_INCLUDE_PATH")
|
| 193 | (files '("include")))
|
| 194 | (search-path-specification
|
| 195 | (variable "LIBRARY_PATH")
|
| 196 | (files '("lib")))
|
| 197 | (search-path-specification
|
| 198 | (variable "MES_PREFIX")
|
| 199 | (separator #f)
|
| 200 | (files '("")))))
|
| 201 | (synopsis "Scheme interpreter and C compiler for full source bootstrapping")
|
| 202 | (description
|
| 203 | "GNU Mes--Maxwell Equations of Software--brings the Reduced Binary Seed
|
| 204 | bootstrap to Guix and aims to help create full source bootstrapping for
|
| 205 | GNU/Linux distributions. It consists of a mutual self-hosting Scheme
|
| 206 | interpreter in C and a Nyacc-based C compiler in Scheme and is compatible with
|
| 207 | Guile.")
|
| 208 | (home-page "https://www.gnu.org/software/mes/")
|
| 209 | (license gpl3+)))
|
| 210 |
|
| 211 | (define-public mescc-tools
|
| 212 | (package
|
| 213 | (name "mescc-tools")
|
| 214 | (version "1.7.0")
|
| 215 | (source (origin
|
| 216 | (method url-fetch)
|
| 217 | (uri (string-append "mirror://savannah/" name "/"
|
| 218 | name "-" version ".tar.gz"))
|
| 219 | (sha256
|
| 220 | (base32
|
| 221 | "0p2pnvci9vglmf7zas12ay2v5gnrwafqsqqw1dfyb2bgayzzg0mn"))))
|
| 222 | (build-system gnu-build-system)
|
| 223 | (supported-systems '("i686-linux" "x86_64-linux"
|
| 224 | "armhf-linux" "aarch64-linux"
|
| 225 | "riscv64-linux"))
|
| 226 | (arguments
|
| 227 | (list
|
| 228 | #:make-flags #~(list (string-append "PREFIX=" #$output))
|
| 229 | #:test-target "test"
|
| 230 | #:phases #~(modify-phases %standard-phases
|
| 231 | (delete 'configure))))
|
| 232 | (native-inputs (list which))
|
| 233 | (synopsis "Tools for the full source bootstrapping process")
|
| 234 | (description
|
| 235 | "Mescc-tools is a collection of tools for use in a full source
|
| 236 | bootstrapping process. It consists of the M1 macro assembler, the hex2
|
| 237 | linker, the blood-elf symbol table generator, the kaem shell, exec_enable and
|
| 238 | get_machine.")
|
| 239 | (home-page "https://savannah.nongnu.org/projects/mescc-tools")
|
| 240 | (license gpl3+)))
|
| 241 |
|
| 242 | (define-public m2-planet
|
| 243 | (package
|
| 244 | (name "m2-planet")
|
| 245 | (version "1.12.0")
|
| 246 | (source (origin
|
| 247 | (method url-fetch)
|
| 248 | (uri (string-append
|
| 249 | "https://github.com/oriansj/M2-Planet/releases/download/"
|
| 250 | "Release_" version "/" name "-" version ".tar.gz"))
|
| 251 | (sha256
|
| 252 | (base32
|
| 253 | "16vgad5wa5lmh6mjnkid4qn2xs7hfcfn43z9gd8iljzvsxl2i8z7"))))
|
| 254 | (native-inputs (list mescc-tools))
|
| 255 | (build-system gnu-build-system)
|
| 256 | (supported-systems '("i686-linux" "x86_64-linux"
|
| 257 | "armhf-linux" "aarch64-linux"
|
| 258 | "riscv64-linux"))
|
| 259 | (arguments
|
| 260 | `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
|
| 261 | ,(string-append "CC=" (cc-for-target)))
|
| 262 | #:tests? #f
|
| 263 | #:phases (modify-phases %standard-phases
|
| 264 | (delete 'bootstrap)
|
| 265 | (delete 'configure))))
|
| 266 | (synopsis "The PLAtform NEutral Transpiler")
|
| 267 | (description
|
| 268 | "M2-Planet, the PLAtform NEutral Transpiler, when combined with
|
| 269 | mescc-tools, compiles a subset of the C language into working binaries with
|
| 270 | introspective steps in between. It is self-hosting and for bootstrapping it
|
| 271 | also has an implementation in the M1 macro assembly language. M2-Planet is
|
| 272 | built as Phase-5 of the full source bootstrapping process and is capable of
|
| 273 | building GNU Mes.")
|
| 274 | (home-page "https://github.com/oriansj/m2-planet")
|
| 275 | (license gpl3+)))
|
| 276 |
|