-
Notifications
You must be signed in to change notification settings - Fork 70
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
Add support for building namespace.*
without eval'ing nixpkgs
#459
Conversation
changed_attrs = {} | ||
for system in self.systems: | ||
changed_attrs[system] = set() | ||
for package in self.only_packages: | ||
changed_attrs[system].add(package) |
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.
I was unsure how to name a function that does this so I duplicated code instead
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.
That's fine.
bfab973
to
8428a96
Compare
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.
Looking good !
nixpkgs_review/nix/evalAttrs.nix
Outdated
@@ -27,6 +27,12 @@ let | |||
drvPath = null; | |||
}) | |||
] | |||
else if !lib.isDerivation pkg then | |||
if builtins.typeOf pkg != "set" then | |||
# if it is not a package, ignore it (it is probably something line overrideAttrs) |
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 it is not a package, ignore it (it is probably something line overrideAttrs) | |
# if it is not a package, ignore it (it is probably something like overrideAttrs) |
?
changed_attrs = {} | ||
for system in self.systems: | ||
changed_attrs[system] = set() | ||
for package in self.only_packages: | ||
changed_attrs[system].add(package) |
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.
That's fine.
nixpkgs_review/nix.py
Outdated
@@ -251,6 +251,7 @@ def nix_eval( | |||
"--nix-path", | |||
nix_path, | |||
"--json", | |||
"--show-trace", |
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.
Maybe you forgot to remove this ?
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.
Not really, it does help a lot
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.
I'm not so sure about this... Anyway, let's not have it in this PR. Let's stick to the mentioned feature.
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.
Ok, reverted it
8428a96
to
6fe5864
Compare
It would be great to add a test. |
E.g. `nixpkgs-revew pr/rev --package vimPlugins` will build all packages that are in `vimPlugins` namespace`
6fe5864
to
568a10d
Compare
@GaetanLepage added tests, I hope correctly |
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.
LGTM, thanks @PerchunPak !
Have you been testing it on your side ?
Yes |
@mergify queue |
🛑 The pull request has been merged manuallyThe pull request has been merged manually at e0c47a9 |
E.g.
nixpkgs-revew pr/rev --package vimPlugins
will build all packages that are invimPlugins
namespace`Fixes #430
CC @GaetanLepage