Hi,

Georgi Kirilov <kirilov.georg...@gmail.com> skribis:

> is there anything in Guix that can do things at install time, like postinst
> scripts in Debian?

No.  There are “profile hooks” in (guix profiles) that are used to a
similar effect, for instance to assemble the ‘dir’ file that contains
pointers to Info documentation.

> A program in a package I created is trying to access /var, but has no
> permissions. (Well, /gnu/store/.../var)
> The 'install' make target was doing 'chgrp' and 'install -g', but I had to
> remove these because there was no such group in the chroot jail. And it
> would be wrong anyway, as the gid in the jail would be different from that
> in the systems where the package will be installed.
> So, I guess /gnu/store/.../var has to be chgrp-ed during installation, on
> the user's system.

First, you probably need to pass --localstatedir=/var to this package’s
configure state, since at run time it won’t be able to write to
/gnu/store/…/var anyway.

Second, it will try and fail to create /var.  The way to address that is
by simply commenting out or patching out the offending commands.  See
for instance ‘avahi-localstatedir.patch’ or ‘mcron-install.patch’.

HTH!

Ludo’.

Reply via email to