Repository navigation
Set a kept profile with nix build --profile - #162
Merged
Merged
Conversation
The activate script of a kept profile, which nvf, nixvim and nemacs configurations have, pointed the profile at the package with nix-env --set. It now runs nix build --no-link --profile, with nix-command enabled for the call. The generations it makes are the same links, and nix profile history and nix profile rollback read them. --no-link keeps the build from leaving a result link in the directory the script runs from. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
activatescript of a kept profile, which the nvf, nixvim and nemacs integrations give each configuration, pointed the profile at the package withnix-env --set. It now runsnix build --no-link --profile, withnix-commandenabled for that call, so the script calls no legacy command.The generations it makes are the same links as before. On a profile with no package manifest,
nix build --profile <path> <store path>sets a generation,nix profile history --profile <path>lists the generations, andnix profile rollback --profile <path>returns to the previous one. I checked that on a scratch profile.--no-linkkeeps the build from leaving aresultlink in the directory the script runs from, which a plainnix build --profiledoes.The nemacs command in clhodapp/nemacs#2 lists and rolls back generations with those
nix profilecommands.nix flake check --keep-going -Lpasses on x86_64-linux, VM tests included. CI runs theaarch64-darwinchecks. Thenix-envcalls in the tests are left as they are: they set a profile by hand to simulate a user doing so.🤖 Generated with Claude Code