From: Alyssa Ross <hi@alyssa.is>
To: Demi Marie Obenour <demiobenour@gmail.com>,
Spectrum OS Development <devel@spectrum-os.org>
Subject: Re: [PATCH] Add wrapper scripts to run make in a Nix shell
Date: Fri, 08 Aug 2025 20:36:44 +0200 [thread overview]
Message-ID: <87tt2h4q4j.fsf@alyssa.is> (raw)
In-Reply-To: <0c439512-95cb-408a-b95a-9718672d8fe4@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1506 bytes --]
Demi Marie Obenour <demiobenour@gmail.com> writes:
> On 8/8/25 14:02, Alyssa Ross wrote:
>> Demi Marie Obenour <demiobenour@gmail.com> writes:
>>
>>> On 8/8/25 11:00, Alyssa Ross wrote:
>>>> Demi Marie Obenour <demiobenour@gmail.com> writes:
>>>>
>>>>> It is very easy to forget to do this, and the results are confusing at
>>>>> best and wrong at worst. Add wrapper scripts that get it right and also
>>>>> automatically change to the correct directory for you.
>>>>
>>>> I think you'd probably be better setting up nix-direnv or something. It
>>>> makes it so that you can't forget to be in the shell, but also means you
>>>> can just run make, rather than having to remember to run some other
>>>> script. It also comes with caching I think, so if that works you'll
>>>> probably save quite a bit of time over doing a Nix evaluation for every
>>>> make invocation.
>>>
>>> For general development I agree, but unless nix-direnv always rebuilds
>>> when needed I think wrappers like this might be better for scripted use.
>>> The big advantage is that they guarantee the environment variables
>>> passed to 'make' will always be up-to-date, and I'm not sure how to
>>> achieve that in a script otherwise.
>>
>> I think that's exactly what it does, but do correct me if I'm wrong.
>
> Is there a way to use nix-direnv from a script?
direnv exec? But it's a relatively obscure thing to want to do, because
generally it makes it so you don't need to think about it…
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
prev parent reply other threads:[~2025-08-08 18:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-07 18:50 [PATCH] Add wrapper scripts to run make in a Nix shell Demi Marie Obenour
2025-08-08 15:00 ` Alyssa Ross
2025-08-08 17:32 ` Demi Marie Obenour
2025-08-08 18:02 ` Alyssa Ross
2025-08-08 18:30 ` Demi Marie Obenour
2025-08-08 18:36 ` Alyssa Ross [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tt2h4q4j.fsf@alyssa.is \
--to=hi@alyssa.is \
--cc=demiobenour@gmail.com \
--cc=devel@spectrum-os.org \
/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://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
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 NNTP newsgroup(s).