all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jesse <dev@millwood.earth>
To: help-guix@gnu.org
Subject: Re: Help with channel build system and package
Date: Thu, 15 Feb 2024 08:23:37 -0500	[thread overview]
Message-ID: <71333165-cb1a-40b2-aee0-70eb68ded67a@millwood.earth> (raw)
In-Reply-To: <3091283.mvXUDI8C0e@akashi>

> About the warnings of invalid argument list: comment out the argument lists in
> the toolchain packages (I do not remember fully the names, I do not have acces
> to the big computer right now for easy reference). See how the change effects
> the build.
>
> I learned a lot by intentionally breaking code and reading the errors.
>
I ended up trying that, removing the arguments from the package, but I 
did not get any change in the output.

One thing I did try is trying to build with the repl. I made this 
script, named build-repl.scm:

(use-modules
  (guix store)
  (guix derivations)
  (guix packages)
  ;;(embedded-dev packages)
  )

(define (build-packages packages)
   (with-store store
     (let ((builds (map (lambda (package)
                          (package-derivation store package))
                        packages)))
       (build-derivations store builds))))
(define (build-package package)
   (build-packages (list package)))

Which i got from here: 
https://lists.gnu.org/archive/html/help-guix/2020-06/msg00173.html

I don't seem to be able to use my channel here for some reason but I 
think I got around that later.

For context, this is my directory layout:

embedded-dev-chan
├── build-repl.scm
├── .guix-channel
└── embedded-dev
     ├── build
     │   └── crosstool-ng-build-system.scm
     ├── build-system
     │   └── crosstool-ng.scm
     └── packages
         └── crosstool-ng.scm

My understanding is that by adding embedded-dev-chan to the load path I 
should be able to use the guile files inside with something like 
(use-modules embedded-dev packages crosstool-ng).

I invoked the repl: guix repl -L /home/jesse/Code/embedded-dev-chan

Then I loaded the "build-repl.scm" script and tried to build my package:

scheme@(guix-user)> ,load /home/jesse/Code/embedded-dev-chan/build-repl.scm
scheme@(guix-user) [2]> (use-modules (embedded-dev packages crosstool-ng))
While compiling expression:
Syntax error:
unknown location: lambda*: invalid argument list in subform ((phases 
(quote %standard-phases)) (outputs (quote ("out"))) (search-paths (quote 
())) (system (%current-system)) (guile #f) (imported-modules 
%crosstool-ng-build-system-modules) (modules (quote ((embedded-dev build 
crosstool-ng-build-system) (guix build utils))))) of (name inputs 
(phases (quote %standard-phases)) (outputs (quote ("out"))) 
(search-paths (quote ())) (system (%current-system)) (guile #f) 
(imported-modules %crosstool-ng-build-system-modules) (modules (quote 
((embedded-dev build crosstool-ng-build-system) (guix build utils)))))

This seems like it is giving me a little more to go off of. I pretified 
the output a bit:

((phases
   (quote %standard-phases))
  (outputs (quote ("out")))
  (search-paths (quote ()))
  (system (%current-system))
  (guile #f)
  (imported-modules %crosstool-ng-build-system-modules)
  (modules
   (quote ((embedded-dev build crosstool-ng-build-system)
           (guix build utils)))))

of

(name
  inputs
  (phases (quote %standard-phases))
  (outputs (quote ("out")))
  (search-paths (quote ()))
  (system (%current-system))
  (guile #f)
  (imported-modules %crosstool-ng-build-system-modules)
  (modules (quote ((embedded-dev build crosstool-ng-build-system)
                   (guix build utils)))))


I'm not quite sure what this is trying to tell me. It seems like it is 
an issue around here in embedded-dev/build-system/crosstool-ng.scm:

(define* (crosstool-ng-build name inputs
                              (phases '%standard-phases)
                              (outputs '("out"))
                              (search-paths '())
                              (system (%current-system))
                              (guile #f)
                              (imported-modules 
%crosstool-ng-build-system-modules)
                              (modules '((embedded-dev build 
crosstool-ng-build-system)
                                         (guix build utils)))
                              )
   "Build Crosstool-ng toolchain"

   (define build
     #~(begin
         (use-modules #$@(sexp->gexp modules))

         #$(with-build-variables inputs outputs
             #~(crosstool-ng-build #:name #$name
                                   #:source #+source
                                   #:system #$system
                                   #:phases #$(if (pair? phases)
                                                  (sexp->gexp phases)
                                                  phases)
                                   #:outputs %outputs
                                   #:search-paths '#$(sexp->gexp
                                                      (map
search-path-specification->sexp
search-paths))
                                   #:inputs %build-inputs))))

   (mlet %store-monad ((guile (package->derivation (or guile 
(default-guile))
                                                   system #:graft? #f)))
     (gexp->derivation name build
                       #:system system
                       #:target #f
                       #:modules imported-modules
                       #:guile-for-build guile)))


My first thought was that there was a mismatch between the arguments of 
crosstool-ng-build -> build -> gexp->derivation. But the arguments all 
seem to match up. I compared to build-system/ruby.scm and that part 
seems really close to that as well except for some arguments that seem 
like they are ruby specific.

There must be some nuance that I'm missing here.

Jesse

  reply	other threads:[~2024-02-15 13:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-08  3:27 Help with channel build system and package Jesse
2024-02-08  3:37 ` Carlo Zancanaro
2024-02-08 14:32   ` Jesse
2024-02-08 17:00     ` Marek Paśnikowski
2024-02-08 18:33       ` Jesse Millwood
2024-02-08 18:52         ` Marek Paśnikowski
2024-02-15 13:23           ` Jesse [this message]
2024-03-08  2:35             ` Jesse Millwood
2024-03-08 10:43               ` Marek Paśnikowski
2024-03-09 14:44                 ` Jesse Millwood
2024-03-09  3:39               ` Richard Sent
2024-03-09 15:02                 ` Jesse Millwood
2024-03-16 21:47                   ` Jesse Millwood
2024-03-16 22:50                     ` Jesse Millwood

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

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

  git send-email \
    --in-reply-to=71333165-cb1a-40b2-aee0-70eb68ded67a@millwood.earth \
    --to=dev@millwood.earth \
    --cc=help-guix@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.