-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
atop, netatop, nixos/atop: improve packaging and options #123053
Conversation
Result of 8 packages marked as broken and skipped:
11 packages built successfully:
Result of 4 packages marked as broken and skipped:
15 packages built successfully:
7 suggestions:
|
…top, gpuatop, allow setuid wrapper
…er enabling options
- use "with subtest" everywhere - do more in nix and less in python - use makeTest directly to define multiple tests instead of one with multiple nodes -> this enables them to run in parallel
@ofborg test atop.everything |
Sorry @7c6f434c, I accidentally requested a re-review just now. |
@ofborg test atop.defaults I am not a very careful person |
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.
Diff looks good
"BINPATH=/bin" | ||
"SBINPATH=/bin" | ||
"MAN1PATH=/share/man/man1" | ||
"MAN5PATH=/share/man/man5" | ||
"MAN8PATH=/share/man/man8" | ||
"SYSDPATH=/lib/systemd/system" | ||
"PMPATHD=/lib/systemd/system-sleep" |
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.
Why do they not include $out?
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.
They are all used as like this: $(DESTDIR)$(BINPATH)
, so $out
is correctly prepended.
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.
@SuperSandro2000 Works for you? Alternativeley I can DESTDIR=""
and fully qualify all the names, but then I'd have to go through the Makefile again because I only mentioned the keys that were relevant, and were wrong by default with DESTDIR=$(out)
.
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
❤️ Thank you @7c6f434c @aanderse @SuperSandro2000 |
}; | ||
package = mkOption { | ||
type = types.package; | ||
default = config.boot.kernelPackages.netatop; |
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.
detaultText
attribute missing for a package.
This can lead to breakage in some evals:
error: attribute 'netatop' missing, at /nix/store/md569yk7k26jdknlbarfyai4i1lb7kkj-nixexprs.tar.xz/nixos/modules/programs/atop.nix:38:21
(The other option here with a package would also need a defaultText
)
(I don't think we have a linkable discussion or documentation about how default
values for types.package
options can cause issues with evaluations, sorry :/)
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.
Hey @samueldr, sorry I broke your website build :-(
I'm opening a PR momentarily adding defaultTexts.
I'm having a problem with the tests locally, but I think I've got a fix already.
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.
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.
No biggie about the build failure :). It's an unusual failure type that, for this particular package, won't be a problem on the Hydra for NixOS itself. So it's really not obvious that it can cause some fringe breakage.
This rather unexpected broke my atoprc because |
…f configured without the need to atop.enable see: NixOS#123053 (comment)
@Shados Sorry for breaking your config. This case slipped my attention. I just opened a mini PR adding a test for your case and a fix. |
Note this allows the use of unfree packages. I am going to revert that part. |
Motivation for this change
The atop package where missing some files from upstream that I wanted to use (systemd units), mostly because
$out
instead of$(out)
was used in a make context and this led to them not being copied.The netatop package was missing the unit file for the netatop service, which is required for process accounting.
The nixos/atop module was extended to include configuration for all of atop's standard components, and optionally atopgpu and netatop.
Because I don't have a NVIDIA GPU, I wasn't able to test
atopgpud
.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)