* Packaging a simple Guile library
@ 2020-02-10 17:27 sirgazil
2020-02-12 14:23 ` Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: sirgazil @ 2020-02-10 17:27 UTC (permalink / raw)
To: Guix Help
Hi,
I created a private Guix channel to experiment with packaging and started with a simple Guile library whose source looks like this:
#+BEGIN_EXAMPLE
guile-lab
├── doc ← Texinfo doc
├── glab ← The library
├── glab.svg
├── locale
├── packages ← Has .scm files
├── README.org
├── scripts ← Has .scm files
└── tests ← Has .scm files
#+END_EXAMPLE
I thought using the "guile-build-system" would make this straightforward, but it didn't work as I expected. I was hoping to say, "Hey, guile-build-system:"
1. "glab" is the library you should build and install.
2. "doc" is the texinfo documentation you should build and install
But this build system compiles every scheme file in the source, which results in a build failure in the case of my package, and the documentation it installs is just the README file, not the info documentation.
leoprikler suggested me on #guix that "In that case you'll need one phase to (invoke "makeinfo" ...) and you'll also have to wrap the build and install phases in directory excursions".
So far, I've tried modifying the build phase as follows:
#+BEGIN_SRC scheme
(arguments
'(#:phases
(modify-phases
%standard-phases
(replace
'build
(lambda args
(with-directory-excursion
"glab"
(apply (assoc-ref %standard-phases 'build) args)))))))
#+END_SRC
This fixed the initial package build failure, but now the build phase fails like this:
#+BEGIN_EXAMPLE
ice-9/boot-9.scm:752:25: In procedure dispatch-exception:
no code for module (glab i18n)
process '/gnu/store/1mkkv2caiqbdbbd256c4dirfi4kwsacv-guile-2.2.6/bin/guild guild compile -L . -o /gnu/store/318q4snsz936zblwgya0m027f6zwpadj-guile-glab-0.1.0/lib/guile/2.2/site-ccache/./farewells.go ././farewells.scm -Wunbound-variable -Warity-mismatch -Wformat ' failed with status 256
#+END_EXAMPLE
So it seems I need to make the "glab" modules available in the build phase for the modules to compile, but I couldn't figure out how.
Any help welcomed :)
---
https://sirgazil.bitbucket.io/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Packaging a simple Guile library
2020-02-10 17:27 Packaging a simple Guile library sirgazil
@ 2020-02-12 14:23 ` Ludovic Courtès
2020-02-12 16:46 ` sirgazil
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2020-02-12 14:23 UTC (permalink / raw)
To: sirgazil; +Cc: Guix Help
Hi,
sirgazil <sirgazil@zoho.com> skribis:
> I thought using the "guile-build-system" would make this straightforward, but it didn't work as I expected. I was hoping to say, "Hey, guile-build-system:"
>
> 1. "glab" is the library you should build and install.
> 2. "doc" is the texinfo documentation you should build and install
>
> But this build system compiles every scheme file in the source, which
> results in a build failure in the case of my package,
The #:not-compiled-file-regexp option allows you to specify files not to
compile. Let me know if it works for you.
> and the documentation it installs is just the README file, not the
> info documentation.
Ah, that part is missing from the build system, we should probably add
it. In the meantime, you can add a custom phase, as you wrote.
HTH,
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Packaging a simple Guile library
2020-02-12 14:23 ` Ludovic Courtès
@ 2020-02-12 16:46 ` sirgazil
0 siblings, 0 replies; 3+ messages in thread
From: sirgazil @ 2020-02-12 16:46 UTC (permalink / raw)
To: "Ludovic Courtès"; +Cc: Guix Help
---- On Wed, 12 Feb 2020 09:23:48 -0500 Ludovic Courtès <ludo@gnu.org> wrote ----
> Hi,
>
> sirgazil <sirgazil@zoho.com> skribis:
>
> > I thought using the "guile-build-system" would make this straightforward, but it didn't work as I expected. I was hoping to say, "Hey, guile-build-system:"
> >
> > 1. "glab" is the library you should build and install.
> > 2. "doc" is the texinfo documentation you should build and install
> >
> > But this build system compiles every scheme file in the source, which
> > results in a build failure in the case of my package,
>
> The #:not-compiled-file-regexp option allows you to specify files not to
> compile. Let me know if it works for you.
Yes, that did it! I could build and install my package successfully.
> > and the documentation it installs is just the README file, not the
> > info documentation.
>
> Ah, that part is missing from the build system, we should probably add
> it. In the meantime, you can add a custom phase, as you wrote.
I'll leave this for another version of my package.
Thanks a lot, Ludovic :)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-12 16:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-10 17:27 Packaging a simple Guile library sirgazil
2020-02-12 14:23 ` Ludovic Courtès
2020-02-12 16:46 ` sirgazil
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.