guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add scheme-bytestructures


From: Ludovic Courtès
Subject: Re: [PATCH] Add scheme-bytestructures
Date: Thu, 20 Oct 2016 16:00:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hello,

Amirouche Boubekki <address@hidden> skribis:

> find-files does the right thing, there is no need to filter what it returns.
> From ea88bf4b53a63ba0d54f71622d055c32cd7e346e Mon Sep 17 00:00:00 2001
> From: Amirouche <address@hidden>
> Date: Sun, 9 Oct 2016 12:31:20 +0200
> Subject: [PATCH] gnu: Add guile-bytestructures
>
> * gnu/packages/guile.scm (guile-bytestructures): New variable.

I had to make these extra modifications (the package you sent built but
the result was a bunch of empty directories because ‘find-files’ was
called from the wrong directory):

diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index a03cb44..f99077b 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2016 Eraim Flashner <address@hidden>
 ;;; Copyright © 2016 Alex Kost <address@hidden>
 ;;; Copyright © 2016 Adonay "adfeno" Felipe Nogueira 
<https://libreplanet.org/wiki/User:Adfeno> <address@hidden>
+;;; Copyright © 2016 Amirouche <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1300,13 +1301,11 @@ is no support for parsing block and inline level HTML.")
                                            effective))
                 (source (assoc-ref %build-inputs "source"))
                 (doc (string-append out "/share/doc/scheme-bytestructures"))
-                (scm-files (find-files "bytestructures" "\\.scm$"))
+                (scm-files (with-directory-excursion source
+                             (find-files "bytestructures" "\\.scm$")))
                 (guild (string-append (assoc-ref %build-inputs "guile")
                                       "/bin/guild")))
            ;; Make installation directories.
-           (mkdir-p (string-append module-dir "/bytestructures/guile"))
-           (mkdir-p (string-append module-dir "/bytestructures/r6"))
-           (mkdir-p (string-append module-dir "/bytestructures/body"))
            (mkdir-p doc)
 
            ;; Compile .scm files and install.
@@ -1320,8 +1319,11 @@ is no support for parsing block and inline level HTML.")
                                                                  
(string-rindex file #\.))
                                                       ".go")))
                          ;; Install source module.
+                         (mkdir-p (dirname dest-file))
                          (copy-file file dest-file)
+
                          ;; Install compiled module.
+                         (mkdir-p (dirname go-file))
                          (unless (zero? (system* guild "compile"
                                                  "-L" source
                                                  "-o" go-file
However, with those changes, I get:

--8<---------------cut here---------------start------------->8---
ice-9/boot-9.scm:106:20: Syntax error:
bytestructures/body/base.scm:38:0: definition in expression context, where 
definitions are not allowed, in form (define make-bytestructure-descriptor 
(case-lambda ((size alignment unwrapper getter setter) 
(%make-bytestructure-descriptor size alignment unwrapper getter setter #f)) 
((size alignment unwrapper getter setter meta) (%make-bytestructure-descriptor 
size alignment unwrapper getter setter meta))))
Backtrace:
In ice-9/boot-9.scm:
 157: 12 [catch #t #<catch-closure 8c9560> ...]
In unknown file:
   ?: 11 [apply-smob/1 #<catch-closure 8c9560>]
In ice-9/boot-9.scm:
  63: 10 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 9 [eval # #]
In ice-9/boot-9.scm:
2401: 8 [save-module-excursion #<procedure 8e7880 at ice-9/boot-9.scm:4045:3 
()>]
4050: 7 [#<procedure 8e7880 at ice-9/boot-9.scm:4045:3 ()>]
1724: 6 [%start-stack load-stack #<procedure 8fa7a0 at ice-9/boot-9.scm:4041:10 
()>]
1729: 5 [#<procedure 8fdc60 ()>]
In unknown file:
   ?: 4 [primitive-load 
"/gnu/store/jx9byzydknqixyv4dn19cxa5q7r6s6v9-guile-bytestructures-20160726.53127f6-guile-builder"]
In ice-9/eval.scm:
 387: 3 [eval # ()]
 432: 2 [eval # #]
In ice-9/boot-9.scm:
 768: 1 [for-each #<procedure ca5030 at ice-9/eval.scm:416:20 (a)> #]
In unknown file:
   ?: 0 [scm-error misc-error #f ...]

ERROR: In procedure scm-error:
ERROR: Failed to compile "bytestructures/r7/base.scm" to 
"/gnu/store/m0lqx4wli55dfj45nsjhlhlvgql1p974-guile-bytestructures-20160726.53127f6/share/guile/site/2.0/bytestructures/r7/base.go"!
--8<---------------cut here---------------end--------------->8---

Could you look into it and submit and updated patch?

TIA!

Ludo’.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]