From: Tanguy LE CARROUR <tanguy@bioneland.org>
To: Christopher Baines <mail@cbaines.net>, zimoun <zimon.toutoune@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: Notes from discussion on Quality Assurance from the 10 Years of Guix event
Date: Mon, 24 Oct 2022 13:43:50 +0200 [thread overview]
Message-ID: <166661183085.16281.6483971854463851981@localhost> (raw)
In-Reply-To: <87wn8pisjy.fsf@gmail.com>
Hi Simon,
Quoting zimoun (2022-10-24 09:34:09)
> On dim., 23 oct. 2022 at 17:40, Tanguy LE CARROUR <tanguy@bioneland.org> wrote:
>
> >> guix package --export-manifest > /tmp/my-pkgs.scm
> >> guix refresh -m /tmp/my-pkgs.scm 2>&1 | ...
> >
> > I'm not using manifest (anymore). I used to, but for the time being, I'm using
> > `divenv` + `guix shell` and I'm quite happy with that setup.
>
> Note that the first command above creates the manifest for you.
> Usually, it works well enough. :-)
I guess the "problem" is that I'm a "pipe person". I just don't like
having to create a temp’ file.
But I agree that your solution is more elegant.
> Well, ’direnv’ + ’guix shell’ but you have a manifest, no? I mean how
> does ’guix shell’ know what to provide inside this new shell?
I used to have a `manifest.scm` file. I even used to (silly me!) commit it
into the repository along side the project's code.
I recently realized that it was easier to only have a git-ignored
`.envrc` file containing:
```
use guix-shell python python-wrapper python-jedi poetry […]
```
The other project's dependencies are (still) managed by Poetry, so the
list passed to Guix shell is quite short.
Not that `guix-shell` is a custom function, for Direnv `guix` function
still uses `guix environment`. But this would also work:
```
use guix --ad-hoc python python-wrapper python-jedi poetry […]
```
For some projects that are not dev project, I sometimes use a
`manifest.scm`. I guess it also depends on the Moon phase. In those rare
cases, my `.envrc` contains the following:
```
use guix-shell -m manifest.scm
```
Which can be abbreviated to `use guix-shell`, because it auto-magically
loads the `manifest.scm` or `guix.scm` file present inside the folder.
Regarding the `guix.scm` file, I recently decided to also move them out
of the code repository of the (personal) projects I needed to package
for Guix, because they don't actually belong with the code. They now live in
a dedicated repository that I added to my Guix channels.
> For what it is worth, I have used similar workflow but I have been bored
> to run “guix pull”, do some stuff unrelated to ’project’, then later be
> back on ’project’ and then have failures. Instead, my workflow is
> splited into 2 ways depending on my phase of the Moon. Either, I create
> a profile inside the project directory. Either, I use channels.scm +
> manifest.scm and often run via ’guixify’ script (see below); e.g.,
>
> guixify foo # run foo using the Guix environment
> guixify # enter in the environment
Thanks for sharing! I used to have the same kind of setup, but…
> Maybe, ’direnv’ would do a better job.
I wrote a `profile` function for Direnv that was doing the job of
loading the environment.
```
use profile the-profile-for-my-project
```
I also had a `guix-all-profile` command that would executing the same command
on all my profiles. Basically looping over them to `--upgrade` or `--delete-generations`.
But I found it easier to use Guix shell.
> The good point is that channels.scm and manifest.scm are included in the Git
> tree of the project. And they can be re-used with ’guix pack -f docker -m
> manifest.scm’ to generate Docker pack that I can share with colleagues.
My colleagues use Debian. We agreed that I would not pollute the repo
with my Guix files if they would not commit their Debian support files. 😅
Regards,
--
Tanguy
next prev parent reply other threads:[~2022-10-24 11:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-18 15:55 Notes from discussion on Quality Assurance from the 10 Years of Guix event Christopher Baines
2022-10-05 14:01 ` Tanguy LE CARROUR
2022-10-05 16:51 ` Christopher Baines
2022-10-09 15:58 ` Tanguy LE CARROUR
2022-10-18 16:19 ` Tanguy LE CARROUR
2022-10-19 9:57 ` zimoun
2022-10-23 15:40 ` Tanguy LE CARROUR
2022-10-24 7:34 ` zimoun
2022-10-24 11:43 ` Tanguy LE CARROUR [this message]
2022-10-23 21:33 ` kiasoc5
2022-10-19 19:31 ` Efraim Flashner
2022-10-23 15:48 ` Tanguy LE CARROUR
2022-10-24 7:44 ` zimoun
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=166661183085.16281.6483971854463851981@localhost \
--to=tanguy@bioneland.org \
--cc=guix-devel@gnu.org \
--cc=mail@cbaines.net \
--cc=zimon.toutoune@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
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).