nativeCheckInputs doesn't work when working outside of Nixpkgs?

I’m experiencing a most peculiar issue when trying to add a flake.nix to a Python package:

I mostly copied Nixpkgs’ default.nix to a file I called ./pkg.nix in the package’s repository. Now I use in flake.nix:

packages = {
  scipy = pkgs.python3.pkgs.callPackage ./pkg.nix args;
};

In pkg.nix I have:

nativeCheckInputs = [ nose pytest pytest-xdist ];

As in Nixpkgs, and from some reason, e.g pytest is not available for the builder’s python. Nixpkgs’ build succeeds, so I conclude that no such issue is present there. The full Nix code is here:

And here:

Help will be appreciated!

You are checking for pytest in configurePhase but since it is in checkInputs it will only be available in the checkPhase because strictDeps for all python building functions is enabled.

1 Like

Your flake is locked to a commit before nativeCheckInputs existed. (named just checkInputs at that point) Such renames are hard to deal with, unfortunately.

1 Like

Thanks! This was it.