From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: Installing a package using guile script Date: Wed, 15 May 2019 22:56:05 +0200 Message-ID: <87o943qvx6.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:57735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hR0wd-0002Nu-9Y for help-guix@gnu.org; Wed, 15 May 2019 16:56:12 -0400 In-Reply-To: (Reza Alizadeh Majd's message of "Mon, 06 May 2019 10:13:48 -0400") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Reza Alizadeh Majd Cc: help-guix@gnu.org Hello, "Reza Alizadeh Majd" skribis: > Just wanted to now if there is any programming interface available for Gu= ix in order to > install a packages with a Guile script ?=20 > > I actually want to install packages for a specific user, after `guix syst= em reconfigure ... `=20 > command. my plan was to add a simple Guile script after `operating-system= ` definition=20 > 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=20 > is any more programmatic solution for that? Every =E2=80=98guix=E2=80=99 command has at least a corresponding procedure= . So =E2=80=98guix package=E2=80=99 matches precisely the =E2=80=98guix-package=E2=80=99 proce= dure of (guix scripts package). When this is too CLI-ish, you can use more Schemey APIs. For instance, =E2=80=98guix package=E2=80=99 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=E2=80=99.