-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
test-utilities: version test #121896
test-utilities: version test #121896
Conversation
88dbc60
to
95a5897
Compare
95a5897
to
ea2d1cb
Compare
ea2d1cb
to
d374a01
Compare
{ package, | ||
command ? "${package.pname or package.name} --version", | ||
version ? package.version, | ||
}: runCommand "test-version" { buildInputs = [ package ]; meta.timeout = 60; } '' |
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.
}: runCommand "test-version" { buildInputs = [ package ]; meta.timeout = 60; } '' | |
}: runCommand "test-version" { nativeBuildInputs = [ package ]; meta.timeout = 60; } '' |
buildInputs
is for components (linking etc) and not for running. With cross compilation and in the future with strictDeps
, these components will not be added to PATH
.
@Ericson2314 do you think it's feasible to send this to a remote builder in case of cross compilation? Do we an attribute à la pkgs.buildPackages
for this purpose? (I've tried hostP{ackages,*}
, remoteP*
, testP*
)
You'd need a remote builder, but that's better than not being able to run this at all.
d374a01
to
e195ed2
Compare
e195ed2
to
a22412f
Compare
Extract 'version test' to a reusable test utility as discussed in NixOS#119636 (comment) and
a22412f
to
b68130f
Compare
Haven't seen this until now. This is awesome. Thank you very much! ✨ |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/improve-the-jdk-infrastructure-on-nixpkgs/45678/33 |
Motivation for this change
Make adding version tests more likely by making it easier, as
discussed in #119636 (comment)
Long-term I hope 'upstreaming' the tests could replace the functionality
in nixpkgs-update as discussed in
nix-community/nixpkgs-update#260
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)