Including the pytest-xdist package automatically configures numprocesses
to $NIX_BUILD_CORES, so specifying these on a package level has become
redundant.
Note: not a checkInput, because we need
this dependency in the role of a _build_
input during tests: library path, etc.
Solves
E = note: ld: library not found for -liconv
E clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
E
E
E error: failed to compile `rust-hello-world v0.1.0 (/private/tmp/nix-build-python3.9-pre-commit-2.18.1.drv-1/pytest-of-nixbld4/pytest-0/popen-gw3/test_rust_hook0/0/.pre-commit/repomj5itq00)`, intermediate artifacts can be found at `/private/tmp/nix-build-python3.9-pre-commit-2.18.1.drv-1/pytest-of-nixbld4/pytest-0/popen-gw3/test_rust_hook0/0/.pre-commit/repomj5itq00/target`
E
E Caused by:
E could not compile `rust-hello-world` due to previous error
pre_commit/util.py:146: CalledProcessError
in test case
FAILED tests/repository_test.py::test_rust_hook
Allows to build a python env with pre_commit module:
python3.withPackages(p: [p.pre-commit])
pre-commit is already converted to an application in `git-and-tools/default.nix`:
pre-commit = pkgs.python3Packages.toPythonApplication pkgs.python3Packages.pre-commit;
So that it can still be installed as a standalone application.
pre-commit currently install impure Git hooks that look for the
`pre-commit` binary in PATH. If the user has `pre-commit` loaded via a
nix-shell instead of having it installed then GUI editors, such as
Intellij, won't be able to use Git commit because the hook fails trying
to look for the `pre-commit` binary in PATH.
This patch updates the hook template to use the hardcoded path to the
`pre-commit` binary if it was found, fallback to using the one from
PATH.