From: "Ludovic Courtès" <ludo@gnu.org>
To: Reza Alizadeh Majd <r.majd@pantherx.org>
Cc: help-guix@gnu.org
Subject: Re: Installing a package using guile script
Date: Wed, 15 May 2019 22:56:05 +0200 [thread overview]
Message-ID: <87o943qvx6.fsf@gnu.org> (raw)
In-Reply-To: <dc568492-dd2d-407f-9562-b24010620df7@www.fastmail.com> (Reza Alizadeh Majd's message of "Mon, 06 May 2019 10:13:48 -0400")
Hello,
"Reza Alizadeh Majd" <r.majd@pantherx.org> 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’.
prev parent reply other threads:[~2019-05-15 20:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-06 14:13 Installing a package using guile script Reza Alizadeh Majd
2019-05-15 20:56 ` Ludovic Courtès [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o943qvx6.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=help-guix@gnu.org \
--cc=r.majd@pantherx.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).