Skip to content

Commit 537f408

Browse files
Artturindramforever
andcommitted
qemu: Fix Python deps, the third time
Hooks from `python` (specifically the one that adds `pythonPath`) are needed by `python/scripts/mkvenv.py` to find meson With `python.withPackages` ``` python determined to be '/nix/store/r98crvxg8pmrvx9vzymhlwbbvffnzjhl-python3-3.13.6-env/bin/python3' python version: Python 3.13.6 mkvenv: Creating non-isolated virtual environment (with packages from '/nix/store/r98crvxg8pmrvx9vzymhlwbbvffnzjhl-python3-3.13.6-env/lib/python3.13/site-packages') at 'pyvenv' mkvenv: checking for meson>=1.5.0 mkvenv: checking for pycotap>=1.1.0 mkvenv: installing meson==1.5.0, pycotap==1.3.1 ``` With `pythonPackages.python` ``` python version: Python 3.13.6 mkvenv: Creating non-isolated virtual environment at 'pyvenv' mkvenv: checking for meson>=1.5.0 mkvenv: checking for pycotap>=1.1.0 mkvenv: installing pycotap==1.3.1 ``` Here's a diff of the env-vars https://gist.github.com/Artturin/e79f1fcf125ebb138c0012008e719533 the `withPackages` without `pythonOnBuildForHost` was wrong too but changing it didn't fix the issue Fixes this error in qemu-user / qemu minimal ``` $ ./result/bin/qemu-aarch64 ./result/bin/qemu-aarch64: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory ``` Co-authored-by: dramforever <dramforever@live.com>
1 parent 759dcc6 commit 537f408

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkgs/applications/virtualization/qemu/default.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,12 @@ stdenv.mkDerivation (finalAttrs: {
169169
ninja
170170
perl
171171

172-
# Don't change this to python3 and python3.pkgs.*, breaks cross-compilation
173-
(python3Packages.python.withPackages (ps: with ps; [ distlib ]))
172+
# For python changes other than simple package additions, ping @dramforever for review.
173+
# Don't change `python3Packages` to `python3.pkgs.*`, breaks cross-compilation.
174+
python3Packages.distlib
175+
# Hooks from the python package are needed to add `$pythonPath` so
176+
# `python/scripts/mkvenv.py` can detect `meson` otherwise the vendored meson without patches will be used.
177+
python3Packages.python
174178
]
175179
++ lib.optionals gtkSupport [ wrapGAppsHook3 ]
176180
++ lib.optionals enableDocs [

0 commit comments

Comments
 (0)