Files
ibbem f2c3cb82ad pass-git-helper,python3Packages.{hystack-ai,molecule}: Use a hook for the temporary home directory
The content of `env.HOME` is a string taken as verbatim value for the
home directory name. In particular, `env.HOME` isn't evaluated by bash.
Hence, `pass-git-helper`, `haystack-ai` and `molecule` created
unintended directories which ended up in the derivation. Now, they use a
temporary directory which doesn't end up in the derivation.

Note that haystack-ai is currently broken. Hence, I don't know if
setting `HOME` is actually necessary. In any case, it's misleading.
2026-05-17 19:38:51 +02:00

77 lines
1.6 KiB
Nix

{
lib,
ansible-compat,
ansible-core,
buildPythonPackage,
click-help-colors,
enrich,
fetchPypi,
jsonschema,
molecule,
packaging,
pluggy,
rich,
setuptools,
setuptools-scm,
testers,
wcmatch,
withPlugins ? true,
writableTmpDirAsHomeHook,
molecule-plugins,
yamllint,
}:
buildPythonPackage rec {
pname = "molecule";
version = "26.4.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-EuTJBQefZ2KK52VQbGl9K4p0SmXy1Mv1o7IssJ0Nr8Q=";
};
nativeBuildInputs = [
setuptools
setuptools-scm
];
propagatedBuildInputs = [
ansible-compat
ansible-core
click-help-colors
enrich
jsonschema
packaging
pluggy
rich
yamllint
wcmatch
]
++ lib.optional withPlugins molecule-plugins;
pythonImportsCheck = [ "molecule" ];
# tests can't be easily run without installing things from ansible-galaxy
doCheck = false;
passthru.tests.version =
(testers.testVersion {
package = molecule;
command = "PY_COLORS=0 ${pname} --version";
}).overrideAttrs
(old: {
# workaround the error: Permission denied: '/homeless-shelter'
nativeBuildInputs = old.nativeBuildInputs ++ [ writableTmpDirAsHomeHook ];
});
meta = {
description = "Aids in the development and testing of Ansible roles";
homepage = "https://github.com/ansible-community/molecule";
changelog = "https://github.com/ansible/molecule/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = [ ];
mainProgram = "molecule";
};
}