Open MrQubo opened 2 weeks ago
Here's a pretty ugly workaround you could do:
arduino-ide.override {
appimageTools = appimageTools // {
wrapType2 =
args:
appimageTools.wrapType2 (args // { extraPkgs = pkgs: args.extraPkgs pkgs ++ [ pkgs.python3 ]; });
};
}
This method overrides the builder itself to inject the extra logic into it. This should work with other types of builders too.
Thank you, this was exactly what I was looking for !
For the full story (and for future reference), I had added the "esp32" board manager in the Arduino IDE, but it didn't work as it required python with pyserial. With your workaround I now have:
let
arduino-ide_with_pyserial = with pkgs; arduino-ide.override {
appimageTools = appimageTools // {
wrapType2 =
args:
appimageTools.wrapType2 (args // { extraPkgs = pkgs: args.extraPkgs pkgs ++ [
(pkgs.python3.withPackages (m: [m.pyserial]))
];
});
};
};
P.S Thanks to @MrQubo who recommended I make an issue, but then beat me to it
It should be possible to override appimage packages generated with
appimageTools.wrapType2
. I'm thinking something analogous tooverridePythonAttrs
.E.g. something like this should work:
Add a :+1: reaction to issues you find important.