Sorry if this may be an obvious question but I’m still new with nix.
I’m trying to build a python package with nix, uproot, using its expression from nixpkgs.
The package uses pytest in the check phase.
One of the tests requires the package “ROOT” (to test against the original implementation), but since uproot itself does not require it, it’s a non mandatory test, using importorskip.
Uproot builds fine, but when reaching the check phase it fails due to the ROOT test being skipped.
1 - Make a package for ROOT and add it to checkInputs in your uproot package
2 - Disable the failing tests in uproot. The way do this depends on how the tests are implemented in that package. Alternatively, you may disable all the tests in uproot by adding doCheck = false to your package.
Building ROOT is not ideal because ROOT takes a while (hours) to build, which is probably why it is not an input in nixpkgs.
I think I can try using an overlay to override the doCheck attribute.
I asked because I was using uproot from nixpkgs and I feared I was doing something wrong.
Is it normal for a derivation to fail because of a skipped test or is it something about my configuration that makes it so?
Unfortunately this happens a lot, especially in the python ecosystem, where a maintainer will leave off dependencies for their tests. I usually just disable the tests if they’re missing dependencies not defined in the package’s setup.py.
No we don’t. But two of the tests were failing because they tried to fetch files from the network which is disallowed in (sandboxed) builds. That’s why those two are now disabled and the rest successfully run through.