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.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
python3Packages,
|
||||
fetchFromGitHub,
|
||||
writableTmpDirAsHomeHook,
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication (finalAttrs: {
|
||||
@@ -20,7 +21,7 @@ python3Packages.buildPythonApplication (finalAttrs: {
|
||||
|
||||
dependencies = with python3Packages; [ pyxdg ];
|
||||
|
||||
env.HOME = "$TMPDIR";
|
||||
nativeBuildInputs = [ writableTmpDirAsHomeHook ];
|
||||
|
||||
pythonImportsCheck = [ "passgithelper" ];
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
hatchling,
|
||||
writableTmpDirAsHomeHook,
|
||||
boilerpy3,
|
||||
events,
|
||||
httpx,
|
||||
@@ -103,6 +104,7 @@ buildPythonPackage rec {
|
||||
|
||||
nativeBuildInputs = [
|
||||
hatchling
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
@@ -131,8 +133,6 @@ buildPythonPackage rec {
|
||||
transformers
|
||||
];
|
||||
|
||||
env.HOME = "$(mktemp -d)";
|
||||
|
||||
optional-dependencies = {
|
||||
# all = [
|
||||
# farm-haystack
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
testers,
|
||||
wcmatch,
|
||||
withPlugins ? true,
|
||||
writableTmpDirAsHomeHook,
|
||||
molecule-plugins,
|
||||
yamllint,
|
||||
}:
|
||||
@@ -61,7 +62,7 @@ buildPythonPackage rec {
|
||||
}).overrideAttrs
|
||||
(old: {
|
||||
# workaround the error: Permission denied: '/homeless-shelter'
|
||||
HOME = "$(mktemp -d)";
|
||||
nativeBuildInputs = old.nativeBuildInputs ++ [ writableTmpDirAsHomeHook ];
|
||||
});
|
||||
|
||||
meta = {
|
||||
|
||||
Reference in New Issue
Block a user