[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guix environment --profile with --ad-hoc
From: |
Pierre Neidhardt |
Subject: |
Re: guix environment --profile with --ad-hoc |
Date: |
Sat, 13 Mar 2021 09:55:28 +0100 |
Hi!
Lars-Dominik Braun <lars@6xq.net> writes:
> hm, I feel that’s unnecessarly complex with lots of if’s and else’s.
Maybe you misunderstood what I'm trying to do. I'd like to avoid shell
code just to check if the profile root exists before deciding which Guix
command to run.
In other words, I'd like a exexv'able command instead of having to wrap
if with some shell code.
Currently from Emacs, if I must use `call-process` to switch to the environment,
then I must wrap if with some shell code, e.g.
--8<---------------cut here---------------start------------->8---
(call-process
"guix" nil nil nil
"bash" "-c"
"if [ -f ... ]; then
guix environment --profile=...
else
guix environment --root=...
fi")
--8<---------------cut here---------------end--------------->8---
which is more cumbersome and requires brittle shell-escapes compared to
--8<---------------cut here---------------start------------->8---
(call-process
"guix" nil nil nil
"environment" "--profile=..." ...)
--8<---------------cut here---------------end--------------->8---
Does that make sense?
Cheers!
--
Pierre Neidhardt
https://ambrevar.xyz/
signature.asc
Description: PGP signature
- Re: guix environment --profile with --ad-hoc, (continued)
- Re: guix environment --profile with --ad-hoc, zimoun, 2021/03/12
- Re: guix environment --profile with --ad-hoc, Pierre Neidhardt, 2021/03/12
- Re: guix environment --profile with --ad-hoc, Ricardo Wurmus, 2021/03/12
- Re: guix environment --profile with --ad-hoc, Pierre Neidhardt, 2021/03/12
- Re: guix environment --profile with --ad-hoc, zimoun, 2021/03/12
- Re: guix environment --profile with --ad-hoc, Ludovic Courtès, 2021/03/15
- Re: guix environment --profile with --ad-hoc, Lars-Dominik Braun, 2021/03/12
- Re: guix environment --profile with --ad-hoc, Pierre Neidhardt, 2021/03/12
- Re: guix environment --profile with --ad-hoc, Pierre Neidhardt, 2021/03/12
- Re: guix environment --profile with --ad-hoc, Lars-Dominik Braun, 2021/03/13
- Re: guix environment --profile with --ad-hoc,
Pierre Neidhardt <=
- Re: guix environment --profile with --ad-hoc, zimoun, 2021/03/15
Re: guix environment --profile with --ad-hoc, pkill9, 2021/03/10