-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
meson: set checkPhase in setup hook #33311
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
Conversation
@GrahamcOfBorg build gnome-mpv |
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.
Failure for system: x86_64-darwin
Package ‘gnome-mpv-0.13’ in /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/pkgs/applications/video/gnome-mpv/default.nix:31 is not supported on ‘x86_64-darwin’, refusing to evaluate.
a) For `nixos-rebuild` you can set
{ nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.
b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowBroken = true; }
to ~/.config/nixpkgs/config.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.
Success for system: aarch64-linux
post-installation fixup
Wrapping program /nix/store/7f0nqf8n9spmx4db4kpzhwiaxy6mxc5d-gnome-mpv-0.13/bin/gnome-mpv
shrinking RPATHs of ELF executables and libraries in /nix/store/7f0nqf8n9spmx4db4kpzhwiaxy6mxc5d-gnome-mpv-0.13
shrinking /nix/store/7f0nqf8n9spmx4db4kpzhwiaxy6mxc5d-gnome-mpv-0.13/bin/.gnome-mpv-wrapped
gzipping man pages under /nix/store/7f0nqf8n9spmx4db4kpzhwiaxy6mxc5d-gnome-mpv-0.13/share/man/
strip is /nix/store/c6qj0j45xizkrx58i65j75a5ysmqhgrs-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/7f0nqf8n9spmx4db4kpzhwiaxy6mxc5d-gnome-mpv-0.13/bin
patching script interpreter paths in /nix/store/7f0nqf8n9spmx4db4kpzhwiaxy6mxc5d-gnome-mpv-0.13
checking for references to /build in /nix/store/7f0nqf8n9spmx4db4kpzhwiaxy6mxc5d-gnome-mpv-0.13...
/nix/store/7f0nqf8n9spmx4db4kpzhwiaxy6mxc5d-gnome-mpv-0.13
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.
Success for system: x86_64-linux
post-installation fixup
Wrapping program /nix/store/xbi4513jww8d90mvnawhc675nqr9mq4h-gnome-mpv-0.13/bin/gnome-mpv
shrinking RPATHs of ELF executables and libraries in /nix/store/xbi4513jww8d90mvnawhc675nqr9mq4h-gnome-mpv-0.13
shrinking /nix/store/xbi4513jww8d90mvnawhc675nqr9mq4h-gnome-mpv-0.13/bin/.gnome-mpv-wrapped
gzipping man pages under /nix/store/xbi4513jww8d90mvnawhc675nqr9mq4h-gnome-mpv-0.13/share/man/
strip is /nix/store/wxn5gn8amxm1w0ikcx4gbs8a17wvss4j-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/xbi4513jww8d90mvnawhc675nqr9mq4h-gnome-mpv-0.13/bin
patching script interpreter paths in /nix/store/xbi4513jww8d90mvnawhc675nqr9mq4h-gnome-mpv-0.13
checking for references to /tmp/nix-build-gnome-mpv-0.13.drv-0 in /nix/store/xbi4513jww8d90mvnawhc675nqr9mq4h-gnome-mpv-0.13...
/nix/store/xbi4513jww8d90mvnawhc675nqr9mq4h-gnome-mpv-0.13
} | ||
|
||
if [ -z "$dontUseMesonCheck" -a -z "$checkPhase" ]; then | ||
setOutputFlags= |
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 line does not seem applicable to the check phase.
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.
Right, I am sure why I copied it. It does not do anything even in the configurePhase
.
runHook preCheck | ||
|
||
echo "meson check flags: $mesonCheckFlags" | ||
meson test $mesonCheckFlags |
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.
Are you sure that mesonCheckFlags
will be useful?
meson test
is a more obvious label than meson check
.
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.
It can be used for running tests in a wrapper (i.e. valgrind). Not sure if it is useful for packages.
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 for the name, I wanted to be consistent with the rest of the Nix. There is doCheck
attribute and checkPhase
is also used in python derivations even though the invocation is ./setup.py test
.
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.
checkPhase
is common to all Nixpkgs, and calling it testPhase
just because the test command is … test
would be confusing. However, flags are specific to tools and their variables contain the name of the tool, so passing flags to meson test
in $mesonCheckFlags
is surprising. (I'd rather just remove both the variable and the echo.)
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.
Removed. In the future we would probably want to use checkTarget
like triton does but that would require changes to ninja setup hook as well.
2772291
to
c8c230f
Compare
c8c230f
to
d75f95d
Compare
Motivation for this change
Removing boilerplate.
Things done
Built
json_glib
and tests are run.build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)