Nikita Karetnikov <nik...@karetnikov.org> skribis:

>>    (let* ((gh   (assoc-ref %build-inputs "source"))
>
> What is the associated value here?  I assume it should be 'gh.pl'.

Yes.  Actually, “source” is the name of the input that corresponds to
the ‘source’ field of the package.  So, if your package does

  (package
    (source (origin (... (uri ".../gh.pl"))))
    ...)

then in the builder, (assoc-ref %build-inputs "source") will be
/nix/store/...-gh.pl.

> I guess I'm missing something because you said that "Guile and the (guix
> build utils) provide us with everything we need."

I meant they provide procedures equivalent in functionality to
Coreutils, Findutils, and sed.

> Also, why is it necessary to specify (guix build utils) in #:modules and
> import it via 'use-modules' in #:builder too?  According to the manual,
> all arguments are passed to the build system.

(guix build utils) is not a standard Guile module, so if your build
script wants to use it, it needs to be made available in the chroot
where that build script is run.  That’s what the #:module argument does.

Then ‘use-modules’ does the actual import.

HTH,
Ludo’.

Reply via email to