[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Packaging a simple Guile library

From: sirgazil
Subject: Packaging a simple Guile library
Date: Mon, 10 Feb 2020 12:27:02 -0500
User-agent: Zoho Mail


I created a private Guix channel to experiment with packaging and started with 
a simple Guile library whose source looks like this:

├── doc         ← Texinfo doc
├── glab        ← The library
├── glab.svg
├── locale
├── packages    ← Has .scm files
├── scripts     ← Has .scm files
└── tests       ← Has .scm files

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
     (lambda args
        (apply (assoc-ref %standard-phases 'build) args)))))))

This fixed the initial package build failure, but now the build phase fails 
like this:

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 
 ././farewells.scm -Wunbound-variable -Warity-mismatch -Wformat ' failed with 
status 256

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]