I’m trying to package a development version of ansible-playbook-grapher in order to try out a fix that the author is developing. My code looks like this:
ansible-playbook-grapher_repo_v1_1_2-dev = pkgs.fetchFromGitHub {
owner = "haidaraM";
repo = "ansible-playbook-grapher";
rev = "1d804bbb01eab5c07d42f6eb4917e1d643e3c4b3";
sha256 = "spAI/eF+U5VMTj7ac7s01xZ5wEfyHAQ6jFyCvcEU6mE=";
};
ansible-playbook-grapher = pkgs.python3Packages.buildPythonApplication {
pname = "ansible-playbook-grapher";
version = "1.1.2-dev";
buildInputs = [ pkgs.graphviz ];
propagatedBuildInputs = with pkgs.python3Packages; [ ansible-core colour lxml ];
src = ansible-playbook-grapher_repo_v1_1_2-dev;
};
When trying to build this, I get
setting SOURCE_DATE_EPOCH to timestamp 315619200 of file source/tests/test_postprocessor.py
patching sources
configuring
no configure script, doing nothing
building
Executing setuptoolsBuildPhase
Unhandled error:
Traceback (most recent call last):
File "/nix/store/5hckvvf3cxif51vpph7fsqjsjznab0yb-python3.9-ansible-core-2.13.0/lib/python3.9/site-packages/ansible/utils/path.py", line 85, in makedirs_safe
os.makedirs(b_rpath, mode)
File "/nix/store/gwlgfywzqypv91rxw916v81mpzhckdz5-python3-3.9.13/lib/python3.9/os.py", line 215, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/nix/store/gwlgfywzqypv91rxw916v81mpzhckdz5-python3-3.9.13/lib/python3.9/os.py", line 215, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/nix/store/gwlgfywzqypv91rxw916v81mpzhckdz5-python3-3.9.13/lib/python3.9/os.py", line 225, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: b'/homeless-shelter'
It seems that this happens when the tests are executed. What would be the cleanest way to simply not run the tests when building the derivation? Related question: Is it generally considered desirable to run the unittests in the derivation build process, or is it considered ok to trust the derivation authors that they have verified that things work?