mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-04 05:50:00 +00:00
63 lines
1.2 KiB
Nix
63 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildFHSEnv,
|
|
platformio-core,
|
|
}:
|
|
|
|
let
|
|
pio-pkgs =
|
|
pkgs:
|
|
let
|
|
inherit (platformio-core) python;
|
|
in
|
|
(with pkgs; [
|
|
platformio-core
|
|
zlib
|
|
git
|
|
libusb1
|
|
xdg-user-dirs
|
|
ncurses
|
|
udev
|
|
# Required for esp-idf and other frameworks that manage their own
|
|
# Python virtual environments during the build process.
|
|
# See: https://github.com/NixOS/nixpkgs/issues/133185
|
|
cmake
|
|
ninja
|
|
])
|
|
++ (with python.pkgs; [
|
|
python
|
|
setuptools
|
|
pip
|
|
wheel
|
|
virtualenv
|
|
bottle
|
|
]);
|
|
|
|
in
|
|
buildFHSEnv {
|
|
pname = "platformio";
|
|
inherit (platformio-core) version;
|
|
|
|
targetPkgs = pio-pkgs;
|
|
# disabled temporarily because fastdiff no longer support 32bit
|
|
# multiPkgs = pio-pkgs;
|
|
|
|
meta = {
|
|
description = "Open source ecosystem for IoT development";
|
|
homepage = "https://platformio.org";
|
|
maintainers = with lib.maintainers; [
|
|
mog
|
|
nikp123
|
|
];
|
|
license = lib.licenses.asl20;
|
|
platforms = with lib.platforms; linux;
|
|
};
|
|
|
|
extraInstallCommands = ''
|
|
ln -s $out/bin/platformio $out/bin/pio
|
|
ln -s ${platformio-core.udev}/lib $out/lib
|
|
'';
|
|
|
|
runScript = "platformio";
|
|
}
|