-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement the ability to devour only uncached derivations of a flake #10
Conversation
Flake lock file updates: • Updated input 'flake-parts': 'github:hercules-ci/flake-parts/dcc36e45d054d7bb554c9cdab69093debd91a0b5' (2023-04-01) → 'github:hercules-ci/flake-parts/7f53fdb7bdc5bb237da7fefef12d099e4fd611ca' (2023-09-01) • Updated input 'flake-parts/nixpkgs-lib': 'github:NixOS/nixpkgs/e3652e0735fbec227f342712f180f4f21f0594f2?dir=lib' (2023-03-30) → 'github:NixOS/nixpkgs/3e52e76b70d5508f3cec70b882a29199f4d1ee85?dir=lib' (2023-08-31) • Updated input 'nixpkgs': 'github:nixos/nixpkgs/2362848adf8def2866fabbffc50462e929d7fffb' (2023-04-21) → 'github:nixos/nixpkgs/e7f35e03abd06a2faef6684d0de813370e13bda8' (2023-09-02)
* No need to depend on bash and stdenv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't had the time to look at this (and the other) PR in detail yet, but could you aim to minimize the diff in your PRs? It would make the review easier for me. For eg., there is no need to move the code to a new devour/flake.nix
.
Refactors are good, but should happen on a PR of their own.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For eg., there is no need to move the code to a new devour/flake.nix.
I wanted the actual flake itself to be usable without having to go through what's in nixpkgs
. As it stands today the stubbed flake = {}
input makes it so it cannot be evaluated. By moving it to a separate directory the scripts can still reference it while they themselves being exposed by the actual repo flake.
Refactors are good, but should happen on a PR of their own.
There wasn't a good way for me to introduce the new build script and show an end-to-end working concept. I tried to keep each of the commits small and incremental so they're easier to review that way. If you'd prefer me to split things out into multiple PRs I can do that, but the content will end up being the same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you'd prefer me to split things out into multiple PRs I can do that, but the content will end up being the same
Yes. Every PR should do one thing, and one thing only. Even when you are updating flake.lock
(0591b56), that should be a PR of its own.
Closing this in favour of the new PRs. Feel free to copy-paste the descriptions to the new PRs as appropriate. |
This PR adds the ability to use
nix-build-uncached
for building the derivations of a flake (instead of justnix build
) which avoids the pitfall of having to download all derivations from the cache even if they're already present.I also did a little bit of re-organization:
flake.nix
has been moved todevour/flake.nix
flake.nix
now defines its own scripts as packages (this also allows one to actually consume the top level flake of this repo without having to rely on the version innixpkgs
)nixpkgs
) is now exposed as.#packages.${system}.devour-flake
.#packages.${system}.devour-flake-uncached
nix
invocations or are meant to modify the behavior of the devour logicFixes #9
Note: if/when this lands we can teach
nixci
how to use this new script when requested, but one step at a time 😁EDIT: related to srid/nixci#19