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
procps: enable systemd support when available #43817
Conversation
@@ -1,4 +1,6 @@ | |||
{ lib, stdenv, fetchurl, ncurses, pkgconfig }: | |||
{ lib, stdenv, fetchurl, ncurses, pkgconfig | |||
, systemd ? null |
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.
This is not the correct way to do this. For instance on macOS systems systemd will not be null - it just won't build because it is linux-only. The closest to a correct solution is something like this:
{ lib, stdenv, fetchurl, ncurses, pkgconfig
, withSystemd ? stdenv.isLinux, systemd
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.
Done
f52d470
to
44ae727
Compare
Something strange happens with this change, it can be seen in GrahamcOfBorg error message above. And it actually breaks nixos VM tests, with the same message. I've tried to look into this a bit, and it looks like things like |
44ae727
to
c554666
Compare
I don't know how to investigate that |
@@ -11,14 +22,16 @@ stdenv.mkDerivation rec { | |||
}; | |||
|
|||
buildInputs = [ ncurses ]; | |||
nativeBuildInputs = [ pkgconfig ]; | |||
nativeBuildInputs = [ pkgconfig ] | |||
++ lib.optional withSystemd systemd; |
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.
This should be a build input.
I pushed a few changes. I could not reproduce the ofborg failure. It could have been something that was closed. |
I've dug deeper into this issue, as VM tests were still failing. Short story is that during tests
As a quick hack I'm going to make a systemd dependency conditional not only on |
`ps` can show various systemd-related information, like a unit to which a process belongs. But when it's not compiled it, it shows only '?' in such fields. Can be tested with: ps -o unit= ax
e6261d0
to
86b0974
Compare
The whole closure only grows by 5 MiB roughly, and it's all very common libraries (very low practical impact).
Merged along with 5ae438a. |
Motivation for this change
ps
can show various systemd-related information, like a unit to which a process belongs. But when it's not compiled in, it shows only?
in such fields.Can be tested with:
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)