guix-devel
[Top][All Lists]
Advanced

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

Re: Profiles/manifests-related command line interface enhancements


From: zimoun
Subject: Re: Profiles/manifests-related command line interface enhancements
Date: Thu, 7 Nov 2019 13:57:08 +0100

Hi Ludo,

On Wed, 6 Nov 2019 at 17:42, Ludovic Courtès <address@hidden> wrote:

> >>> - A Scheme function to create a manifest for the necessary inputs of a
> >>>   package, like =guix environment PACKAGE= does.  (Maybe it's already 
> >>> possible?)
> >>
> >> Like ‘specifications->manifest’?
> >
> > Can specifications->manifest do this?
> >
> > Concrete example:  You want a profile to work on IceCat, so you need a
> > manifest that has all the necessary inputs required to work with Icecat.
> > How can we automate the generation of the manifest?
>
> Ah, that no.  But (guix scripts environment) has
> ‘package-environment-inputs’, which does exactly that, and I guess we
> could expose it and document it.

Maybe I am doing wrong but I get:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix package -p /tmp/guix-dev -m ~/tmp/manif-dep.scm

installing new manifest from '/home/simon/tmp/manif-dep.scm' with 53 entries
guix package: error: profile contains conflicting entries for gzip
guix package: error:   first entry: gzip@1.10
/gnu/store/py3k9zla9fj3z7430v4crqj5pyrsd3qj-gzip-1.10
guix package: error:   second entry: gzip@1.10
/gnu/store/i2cdl0hvrml8hjdqplqln8didnvxkgp5-gzip-1.10
hint: You cannot have two different versions or variants of `gzip' in
the same profile.
--8<---------------cut here---------------end--------------->8---

where I tweak guix/scripts/environment.scm to export
`package-environment-inputs' and ~/tmp/manif-dep.scm contains:

--8<---------------cut here---------------start------------->8---
(use-modules (guix)
             (guix profiles)
             (guix scripts environment)
             (gnu packages package-management))

(make-manifest (package-environment-inputs guix))
--8<---------------cut here---------------end--------------->8---


> More generally, ‘guix environment’ was initially designed in a quite
> monolithic fashion, and I think we could expose its functionality in
> sizable bites.  For instance, Dave suggested long ago exposing an
> <environment> data type, and that’s one thing that could be very useful.

What do you mean by an <environment> data type?



All the best,
simon



reply via email to

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