[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#50960] [PATCH 00/10] Add 'guix shell' to subsume 'guix environment'
From: |
Maxime Devos |
Subject: |
[bug#50960] [PATCH 00/10] Add 'guix shell' to subsume 'guix environment' |
Date: |
Tue, 05 Oct 2021 09:50:02 +0200 |
User-agent: |
Evolution 3.34.2 |
Ludovic Courtès schreef op za 02-10-2021 om 15:43 [+0200]:
> Hi,
>
> Liliana Marie Prikler <liliana.prikler@gmail.com> skribis:
>
> > Am Samstag, den 02.10.2021, 12:22 +0200 schrieb Ludovic Courtès:
> > > [...]
> > > +(define (auto-detect-manifest opts)
> > > + "If OPTS do not specify packages or a manifest, load a
> > > \"guix.scm\" or
> > > +\"manifest.scm\" file from the current directory or one of its
> > > ancestors.
> > > +Return the modified OPTS."
> > > + (define (options-contain-payload? opts)
> > > + (match opts
> > > + (() #f)
> > > + ((('package . _) . _) #t)
> > > + ((('load . _) . _) #t)
> > > + ((('manifest . _) . _) #t)
> > > + ((('expression . _) . _) #t)
> > > + ((_ . rest) (options-contain-payload? rest))))
> > > +
> > > + (if (options-contain-payload? opts)
> > > + opts
> > > + (match (find-file-in-parent-directories '("guix.scm"
> > > "manifest.scm"))
> > > + (#f
> > > + (warning (G_ "no packages specified; creating an empty
> > > environment~%"))
> > > + opts)
> > > + (file
> > > + (info (G_ "loading environment from '~a'...~%") file)
> > > + (match (basename file)
> > > + ("guix.scm"
> > > + (alist-cons 'load `(package ,file) opts))
> > > + ("manifest.scm"
> > > + (alist-cons 'manifest file opts)))))))
> > > [...]
> > What would happen on the top-level of the Guix source tree or deep
> > inside the tree of a guile package that deals with manifests, that
> > aren't necessarily related to Guix?
>
> You mean a directory that contains a file named ‘guix.scm’ or
> ‘manifest.scm’ but that happens to do something completely unrelated?
>
> We can never rule this out, but I’d say it’s unlikely (these two
> conventions are rather well established) and it’s up to the user to pay
> attention.
>
> WDYT?
Guix itself doesn't follow this convention: the guix source tree has an
unrelated
"guix.scm" file, that doesn't evaluate to a package. I'd expect that running
"guix shell" within the guix source tree would be equivalent to
"guix environment guix", but currently this doesn't seem to be the case.
Greetings,
Maxime.
signature.asc
Description: This is a digitally signed message part
[bug#50960] [PATCH 06/10] environment: Skip derivation computation when '--profile' is used., Ludovic Courtès, 2021/10/02
[bug#50960] [PATCH 08/10] environment: Autoload some modules., Ludovic Courtès, 2021/10/02
[bug#50960] [PATCH 05/10] environment: Add tests for '--profile'., Ludovic Courtès, 2021/10/02
[bug#50960] [PATCH 07/10] environment: Do not connect to the daemon when '--profile' is used., Ludovic Courtès, 2021/10/02