help-guix
[Top][All Lists]
Advanced

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

Re: Installing a package using guile script


From: Ludovic Courtès
Subject: Re: Installing a package using guile script
Date: Wed, 15 May 2019 22:56:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Hello,

"Reza Alizadeh Majd" <address@hidden> skribis:

> Just wanted to now if there is any programming interface available for Guix 
> in order to
> install a packages with a Guile script ? 
>
> I actually want to install packages for a specific user, after `guix system 
> reconfigure ... ` 
> command. my plan was to add a simple Guile script after `operating-system` 
> definition 
> in my system configuration file, to add packages to user's profile.
>
> the easiest way is to just run a shell script for to do that for me, but I'm 
> curious that if there 
> is any more programmatic solution for that?

Every ‘guix’ command has at least a corresponding procedure.  So ‘guix
package’ matches precisely the ‘guix-package’ procedure of (guix scripts
package).

When this is too CLI-ish, you can use more Schemey APIs.  For instance,
‘guix package’ relies on things in (guix scripts) and (guix profiles).

As for your specific use case, I would argue that you could implement it
as a service.  The service would take a list of user/manifest pairs as
its configuration and simply have an activation snippet that installs
the user profiles.  That would be a useful feature to have.

HTH!

Ludo’.



reply via email to

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