Looking at: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/pybind11/default.nix, it seemed to me that I should be able to avoid running tests (i.e., set -DPYBIND11_TEST=OFF) with something like the following:
pybind11 = pkgs.pybind11.overrideAttrs (oldAttrs: rec {
doCheck = false;
});
This, however, does not work.
I solved my problem by modifying cmakeFlags directly:
pybind11 = pkgs.pybind11.overrideAttrs (oldAttrs: rec {
cmakeFlags = [
"-DPYTHON_EXECUTABLE=${pkgs.python.interpreter}"
"-DPYBIND11_TEST=OFF"
];
});
But I was wondering why the former approach does not work.