Adding dependencies for arduino-ide

I’m adding some dependencies for my arduino-ide, namely python3 and python312Packages.pyserial

However, despite the compilation worked, it can’t access python3.

Here’s my code:

(arduino-ide.overrideAttrs (oldAttrs: { buildInputs = (with pkgs; [ python3 python312Packages.pyserial ]); }))

Can someone show me the correct way to do this?

Ahh, I get it.

This package requires fhs to run (e.g. when using packages that includes objects and executables.)

So the python should be wrapped into the fhs wrapper.

However, even though I get the point, I still wonder why my previous solution didn’t work, and I want a consistent way to upgrade.

I might consider writing my package and update it when I see a new version.