[Top][All Lists]

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

Ignore / Exclude files and directories in a package definition

From: Zelphir Kaltstahl
Subject: Ignore / Exclude files and directories in a package definition
Date: Sun, 12 Sep 2021 18:10:53 +0000

Hello Guix users,

I have another question about package definitions: How can I specify in a
package definition, that I want Guix to ignore some of the files and 

I wanted to update my package and thought: "Oh, I simply need to update the
version reference and the hash and that will be it!" but I did add a folder
called `guix-env` in which I usually put `manifest.scm`, `channels.scm` and
``, a shell script, which gets me into a Guix environment, in which all
the dependencies listed in `manifest.scm` are installed from the channel
described in`channels.scm` using guix time machine.

When I test the installation of my updated package, Guix seems to pick up those
files and then shows errors in the logs:

guix-env/channels.scm:1:6: warning: possibly unbound variable `channel'
guix-env/channels.scm:2:8: warning: possibly unbound variable `name'
guix-env/channels.scm:3:8: warning: possibly unbound variable `url'
guix-env/channels.scm:4:8: warning: possibly unbound variable `commit'
guix-env/channels.scm:6:8: warning: possibly unbound variable `introduction'
guix-env/channels.scm:7:10: warning: possibly unbound variable 
guix-env/channels.scm:9:12: warning: possibly unbound variable 
[ 1/13] Compiling...
[ 2/13] Compiling...
[ 3/13] Compiling...
guix-env/manifest.scm:1:0: warning: possibly unbound variable 
[ 4/13] Compiling...
ice-9/boot-9.scm:1669:16: In procedure raise-exception:
Syntax error:
unknown location: unexpected syntax in form ()
process '/gnu/store/18hp7flyb3yid3yp49i6qcdq0sbi5l1n-guile-3.0.2/bin/guild 
guild compile -L . -o 
 ././hall.scm -Wunbound-variable -Warity-mismatch -Wformat ' failed with status 

I am convinced, that this is, because at that point, there is no Guix context,
in which those things are defined, as Guix is processing a package and there
should not be any things defined, which do not belong to the package or are in
its inputs. But the thing is, I do not want Guix to pick up and look at those
files in the first place. I would like to put them on a ignore list.

I checked the following docs without finding any way of excluding the files:




In theory I can always make a separate branch in my git repository of the
library and remove these files and then place the version tag on that branch,
but is it really necessary?

And also: If I exclude these files somehow, while keeping them on the commit in
the git repository of my library, do I need to change the guix hash calculation,
to also exclude them when the hash is calculated? I calculated the hash using
the following command inside the root directory of the library:

guix hash --exclude-vcs --recursive .

The library is at:
<>. If you look at the tags
`0.2.0` and compare with `0.2.1`, you can see the additional files, which I want
to exclude.

Best regards,


reply via email to

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