mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-05 17:21:39 -05:00
overrides.poetry-core: "Vendor" dependencies in poetry-core
This commit is contained in:
parent
7520a96a7f
commit
eeb17af37c
1 changed files with 23 additions and 14 deletions
|
@ -1368,12 +1368,21 @@ lib.composeManyExtensions [
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
poetry-core = super.poetry-core.overridePythonAttrs (old: {
|
poetry-core = super.poetry-core.overridePythonAttrs (old:
|
||||||
|
let
|
||||||
|
initFile =
|
||||||
|
if lib.versionOlder super.poetry-core.version "1.1"
|
||||||
|
then "poetry/__init__.py"
|
||||||
|
else "./src/poetry/core/__init__.py";
|
||||||
|
in
|
||||||
|
{
|
||||||
# "Vendor" dependencies (for build-system support)
|
# "Vendor" dependencies (for build-system support)
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
echo "import sys" >> poetry/__init__.py
|
find .
|
||||||
|
|
||||||
|
echo "import sys" >> ${initFile}
|
||||||
for path in $propagatedBuildInputs; do
|
for path in $propagatedBuildInputs; do
|
||||||
echo "sys.path.insert(0, \"$path\")" >> poetry/__init__.py
|
echo "sys.path.insert(0, \"$path\")" >> ${initFile}
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue