-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
python3.pkgs.waitress-django/cudaPackages.saxpy/doc/test-runner: Use lib.fileset #300428
base: master
Are you sure you want to change the base?
Conversation
This prevents unnecessary rebuilds when the default.nix is changed in any way.
This prevents unnecessary rebuilds when the default.nix is changed in any way.
Nice! Though I'd recommend explicitly selecting the files to be included using |
Please regard this as just a nitpick: Many folders here are under your control, so it's possible refactor the folder structure to make filtering unnecessary. |
I don't see anything unusual going on, looks good to me.
|
src = ./.; | ||
src = pkgs.lib.fileset.toSource { | ||
root = ./.; | ||
fileset = pkgs.lib.fileset.difference ./. (pkgs.lib.fileset.unions [ ./common.nix ./default.nix ./shell.nix ]); |
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.
Side notes:
- I frequently find myself repeating some kind of a
fileFilter
to discard the nix files. Makes me wonder if we want a shorthand for this... - Can unnest e.g. via
lib.pipe
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.
As mentioned earlier, I'd really recommend explicitly selecting the files to include:
fileset = pkgs.lib.fileset.difference ./. (pkgs.lib.fileset.unions [ ./common.nix ./default.nix ./shell.nix ]); | |
fileset = pkgs.lib.fileset.unions [ ... ]; |
That's going to be much more resilient.
Description of changes
This causes
default.nix
to be skipped when copying to the store to prevent rebuilds when reformatting the files (or changing them in any way that should not cause rebuilds).Should get rid of the rebuild in #299578.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.