[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 |
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/
- Packaging a simple Guile library,
sirgazil <=