nix-community / lorri

Your project’s nix-env [maintainer=@Profpatsch,@nyarly]
Apache License 2.0
639 stars 24 forks source link

Flakes #107

Closed nyarly closed 2 weeks ago

nyarly commented 3 months ago

Adding flake handling feature.

Lorri captures the context directory in which it was run (or as overridden) and runs nix develop --profile <path> -c bash export - we use the profile as our GC root, and the bash export to feed environment variables to direnv.

Future work might consider using the profile directly, since that might also make it easier to provide non-bash shell shims.

I've started using this feature in a branch and want to give it a little more battletesting before shipping it. In the meaning the flakes-1 branch in the nyarly/lorri repo should work, if anyone else wants to experiment.

Profpatsch commented 3 months ago

Thanks; could you clean up your commits a little and maybe split out unrelated changes into their own PRs?

This branch is very hard to review and has a bunch of unrelated changes.

nyarly commented 3 months ago

I'll see what I can do about cleaning up the commits. There are some unrelated changes, but adding flakes involved touching a lot of the code paths, from the UI down to builder.rs

That said, there are changes here that were engendered by CI failures, which led to trying to fix issues with gcroots in modern NixOS installs, which aren't strictly related. There are a handleful of changes that were just applying good Clippy suggestions.

I'm going to mark this as a draft, and I'll issue a couple of PRs with those, smaller, changes on their own.

nyarly commented 2 weeks ago

Closed in favor of #129