unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
To: Caleb Ristvedt <caleb.ristvedt@cune.org>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: Packaging Jami progress
Date: Tue, 10 Dec 2019 23:56:15 +0100	[thread overview]
Message-ID: <20191210235601.3b48eeaf@interia.pl> (raw)
In-Reply-To: <CAELvotwu-_HTMhbR0p0Jib5MrLMZd9=ARoqwFvgd5fk+jJeNGA@mail.gmail.com>

Hi!

I tried both ways - the second works, but the first doesn't.
That's what I have in the file - if I didn't miss something, it is the
same as your example:

#:imported-modules (,@(source-module-closure
	'((gnu packages jami)
	,@%gnu-build-system-modules)))
#:modules ((gnu packages jami)
	,@(@@ (guix build-system gnu) %default-modules))

And I get an ugly backtrace (could this be a bug or am I doing
something wrong?):

The following derivations will be built:
   /gnu/store/xf6b58rlki7sb3k9fj2dxkm4ljiypdc0-pjproject-jami-2.9.drv
   /gnu/store/aaqaz52fhjb86g233ar4ynnyjvrv7xa7-module-import-compiled.drv
building
/gnu/store/aaqaz52fhjb86g233ar4ynnyjvrv7xa7-module-import-compiled.drv...
Backtrace: In ice-9/eval.scm:
   721:20 19 (primitive-eval _)
In ice-9/psyntax.scm:
  1262:36 18 (expand-top-sequence _ _ _ #f _ _ _)
  1209:24 17 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?)
   285:10 16 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) ?)
In ice-9/eval.scm:
   293:34 15 (_ #<module (#{ g172}#) 7ffff488f5a0>)
In ice-9/boot-9.scm:
   2874:4 14 (define-module* _ #:filename _ #:pure _ #:version _ # _ ?)
  2887:24 13 (_)
   222:29 12 (map1 _)
   222:29 11 (map1 _)
   222:29 10 (map1 _)
   222:29  9 (map1 _)
   222:29  8 (map1 _)
   222:29  7 (map1 (((guix monads)) ((guix records)) ((guix #)) (#) ?))
   222:29  6 (map1 (((guix records)) ((guix base16)) ((guix #)) (#) ?))
   222:29  5 (map1 (((guix base16)) ((guix base32)) ((gcrypt #)) # ?))
   222:29  4 (map1 (((guix base32)) ((gcrypt hash)) ((guix #)) (#) ?))
   222:17  3 (map1 (((gcrypt hash)) ((guix profiling)) ((rnrs #)) # ?))
   2803:6  2 (resolve-interface _ #:select _ #:hide _ #:prefix _ # _ ?)
In unknown file:
           1 (scm-error misc-error #f "~A ~S" ("no code for modu?" ?) ?)
In ice-9/boot-9.scm:
   752:25  0 (dispatch-exception _ _ _)

ice-9/boot-9.scm:752:25: In procedure dispatch-exception:
no code for module (gcrypt hash)
builder for
`/gnu/store/aaqaz52fhjb86g233ar4ynnyjvrv7xa7-module-import-compiled.drv'
failed with exit code 1

Any ideas?

> Hope that helps, thanks for the work on Jami y'all!
No problem.


Dnia 2019-12-10, o godz. 09:59:40
Caleb Ristvedt <caleb.ristvedt@cune.org> napisał(a):

> #:modules and #:imported-modules are distinct arguments. #:modules is
> the modules that your builder is going to use (as in "they go in a
> (use-modules ...) form"), while #:imported-modules is the modules
> that need to be available
> in the build environment. It's complaining at build-time that it
> can't find that
> module to use, because you haven't told it to include that module in
> the build
> environment. #:imported-modules should give a superset of what
> #:modules gives,
> especially if a module in use is going to have indirect
> requirements. Thankfully, wrangling together those indirect
> requirements is already implemented in (guix modules) as
> source-module-closure.
> 
> Thus, you could conceptually do
> 
> 
> (arguments
>      `(#:imported-modules (,@(source-module-closure
>                   '((gnu packages jami)
>                 ,@%gnu-build-system-modules)))
>        #:modules ((gnu packages jami)
>           ,@(@@ (guix build-system gnu) %default-modules))))
> 
> And in theory it would work. Note, though, that this would pull in the
> entire
> module dependency graph of (gnu packages jami), and this may include
> things that
> source-module-closure would have a hard time detecting and aren't
> really needed. Ideally this procedure would be generalized and put in
> (guix build <something>), but I can understand if that's not
> possible. Note also that you
> could simply splice in the definition of your procedure into the
> builder manually, like so:
> 
> (define my-procedure-code '(lambda (a b c) ...))
> 
> (arguments
>  `(#:phases (let ((my-procedure ,my-procedure-code)) (modify-phases
> ...))))
> 
> Hope that helps, thanks for the work on Jami y'all!


Jan Wielkiewicz

  parent reply	other threads:[~2019-12-10 22:56 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-04 20:47 Packaging Jami progress Jan Wielkiewicz
2019-11-04 22:48 ` Gábor Boskovits
2019-11-05 16:50   ` Jan Wielkiewicz
2019-11-05 17:31     ` Gábor Boskovits
2019-11-06 10:30     ` Pierre Neidhardt
2019-11-06 16:24       ` Jan Wielkiewicz
2019-11-06 17:07         ` Pierre Neidhardt
2019-11-07 19:02           ` Pierre Neidhardt
2019-11-07 19:55             ` Jan Wielkiewicz
2019-11-25 21:15             ` Jan
2019-11-26 10:07               ` Pierre Neidhardt
2019-11-26 19:33                 ` Jan
2019-11-26 20:12                   ` Pierre Neidhardt
2019-11-27 11:43                   ` zimoun
2019-11-30 18:21                     ` Jan
2019-11-30 18:38                       ` Pierre Neidhardt
2019-12-01 16:34                         ` Jan
2019-12-01 17:32                           ` Pierre Neidhardt
2019-12-01 18:25                             ` Jan
2019-12-03 15:44                             ` Jan Wielkiewicz
2019-12-03 16:04                               ` Pierre Neidhardt
2019-12-03 18:02                                 ` Jan
2019-12-03 18:37                                   ` Pierre Neidhardt
2019-12-03 18:38                                     ` Pierre Neidhardt
2019-12-04 14:36                                       ` Jan Wielkiewicz
2019-12-04 15:27                                         ` Pierre Neidhardt
2019-12-04 15:50                                           ` Jan Wielkiewicz
2019-12-04 16:06                                             ` Pierre Neidhardt
2019-12-04 16:56                                               ` Jan
2019-12-04 17:01                                                 ` Pierre Neidhardt
2019-12-04 17:22                                                   ` Jan Wielkiewicz
2019-12-05 14:32                                                     ` Pierre Neidhardt
2019-12-05 16:00                                                       ` Jan
2019-12-05 16:28                                                         ` Pierre Neidhardt
2019-12-09 22:17                                                       ` Jan Wielkiewicz
2019-12-10  8:57                                                         ` Pierre Neidhardt
2019-12-10  9:59                                                           ` Caleb Ristvedt
2019-12-10 10:45                                                             ` Pierre Neidhardt
2019-12-10 22:56                                                             ` Jan Wielkiewicz [this message]
2019-12-11  0:43                                                               ` Caleb Ristvedt
2019-12-11 16:33                                                                 ` Jan
2019-11-26 16:43               ` zimoun
2019-11-26 19:14                 ` Pierre Neidhardt
2019-11-07 19:10           ` Pierre Neidhardt
2019-11-07 19:47             ` Jan Wielkiewicz
2019-11-07 20:37               ` Pierre Neidhardt
2019-11-08 18:25                 ` Jan Wielkiewicz
2019-11-11  8:38                   ` Pierre Neidhardt
2019-11-11 10:14                     ` Jan Wielkiewicz
2019-11-11 10:45                       ` Pierre Neidhardt
2019-11-11 15:04                         ` Pierre Neidhardt
2019-11-11 15:38                           ` Jan
2019-11-14 16:48                             ` Pierre Neidhardt
2019-11-14 18:07                               ` Pierre Neidhardt
2019-11-14 20:40                                 ` Jan
2019-11-14 21:54                                   ` Pierre Neidhardt
2019-11-14 22:16                                     ` Jan
2019-11-15  9:07                                       ` Pierre Neidhardt
2019-11-16 12:48                                         ` Jan
  -- strict thread matches above, loose matches on Subject: below --
2019-12-15 20:12 Jan Wielkiewicz
2019-12-15 21:46 ` Ricardo Wurmus
2019-12-15 23:33   ` Jan Wielkiewicz
2019-12-21 23:28   ` Jan Wielkiewicz
2019-12-22  7:48     ` Ricardo Wurmus
2019-12-23 19:43       ` Jan
2019-12-25  1:34         ` Jan
2019-12-25  9:08           ` Efraim Flashner
2019-12-27 18:57           ` Jan Wielkiewicz
2019-12-27 20:32             ` Gábor Boskovits
2019-12-27 21:46               ` Jan Wielkiewicz
2019-12-28  9:40                 ` Pierre Neidhardt
2019-12-28 11:57                   ` Jan
2020-01-03  6:35                     ` Ricardo Wurmus
2020-01-01 15:22                   ` Jan
2020-01-03  6:33                     ` Ricardo Wurmus
2020-01-04  0:13                       ` Jan
2020-01-04 15:37                         ` Pierre Neidhardt
2020-01-06  1:49                           ` Jan
2020-01-06 18:23                           ` Jan
2020-01-06 19:49                             ` Jack Hill
2020-01-06 22:40                             ` zimoun
2020-01-07  7:48                               ` Pierre Neidhardt
2019-12-28  1:34           ` Jan Wielkiewicz
2019-12-28  9:53             ` Pierre Neidhardt
2019-12-28 12:00               ` Jan
2019-12-15 21:47 ` Jan Wielkiewicz

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://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191210235601.3b48eeaf@interia.pl \
    --to=tona_kosmicznego_smiecia@interia.pl \
    --cc=caleb.ristvedt@cune.org \
    --cc=guix-devel@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).