-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flakes] save commit-hash to file, and inspect prior to prefetching n…
…ixpkgs (#681) ## Summary This PR saves the nixpkgs commit hash to a file at `~/.cache/devbox/nixpkgs.txt`. We then inspect this file for the nixpkgs commit hash of the devbox project, and if it is present then we skip the `nix flake prefetch nixpkgs/<commit>` call. Alternate approach: I tried waiting 100 milliseconds to see if the `nix flake prefetch` command is still working as a proxy for deciding if the nixpkgs is being downloaded or not. However, this does NOT work because the nix progress indicator fails to render if we mess with the output from `nix flake prefetch`. See: #680 ## How was it tested? 1. edited devbox.json to have a new nixpkgs commit hash, and started `devbox shell` . Observed the flake prefetch output as before. 2. re-ran `devbox shell` and this time there was no output about nixpkgs being downloaded. As expected.
- Loading branch information
Showing
1 changed file
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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