From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Wielkiewicz Subject: Re: Packaging Jami progress Date: Tue, 10 Dec 2019 23:56:15 +0100 Message-ID: <20191210235601.3b48eeaf@interia.pl> References: <20191104214754.793ec2ff@interia.pl> <20191126203259.0f4141ea@kompiuter> <20191130192121.11e0c968@kompiuter> <87fti52or5.fsf@ambrevar.xyz> <20191201173411.042e68f2@kompiuter> <878snw2bpn.fsf@ambrevar.xyz> <20191203164402.77a8c728@interia.pl> <87tv6hieeg.fsf@ambrevar.xyz> <20191203190235.53765cba@kompiuter> <87fti1mf1u.fsf@ambrevar.xyz> <87d0d5mez0.fsf@ambrevar.xyz> <20191204153631.509b9afb@interia.pl> <87immwt8kh.fsf@ambrevar.xyz> <20191204165038.7a5403f2@interia.pl> <87fti0t6rr.fsf@ambrevar.xyz> <20191204175614.29f663cd@kompiuter> <87a788t47g.fsf@ambrevar.xyz> <20191204182249.38fd0700@interia.pl> <87wobac07c.fsf@ambrevar.xyz> <20191209231729.7a253e9d@interia.pl> <875zioy2vp.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:48461) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ieoQe-00061l-OG for guix-devel@gnu.org; Tue, 10 Dec 2019 17:56:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ieoQd-0008Vh-9N for guix-devel@gnu.org; Tue, 10 Dec 2019 17:56:28 -0500 Received: from smtpo.poczta.interia.pl ([217.74.65.235]:42717) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ieoQb-0008Pr-FZ for guix-devel@gnu.org; Tue, 10 Dec 2019 17:56:27 -0500 In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Caleb Ristvedt Cc: Guix-devel 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 (_ #) 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 napisa=C5=82(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. >=20 > Thus, you could conceptually do >=20 >=20 > (arguments > `(#:imported-modules (,@(source-module-closure > '((gnu packages jami) > ,@%gnu-build-system-modules))) > #:modules ((gnu packages jami) > ,@(@@ (guix build-system gnu) %default-modules)))) >=20 > 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 ), 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: >=20 > (define my-procedure-code '(lambda (a b c) ...)) >=20 > (arguments > `(#:phases (let ((my-procedure ,my-procedure-code)) (modify-phases > ...)))) >=20 > Hope that helps, thanks for the work on Jami y'all! Jan Wielkiewicz