depot/third_party/nixpkgs/pkgs/development/embedded/platformio/chrootenv.nix
Default email 01ed8ef136 Project import generated by Copybara.
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
2022-11-21 19:40:18 +02:00

45 lines
1,009 B
Nix

{ lib, buildFHSUserEnv, version, src }:
let
pio-pkgs = pkgs:
let
python = pkgs.python3;
platformio = python.pkgs.callPackage ./core.nix { inherit version src; };
in
(with pkgs; [
zlib
git
xdg-user-dirs
]) ++ (with python.pkgs; [
python
setuptools
pip
bottle
platformio
]);
in
buildFHSUserEnv {
name = "platformio";
targetPkgs = pio-pkgs;
# disabled temporarily because fastdiff no longer support 32bit
# multiPkgs = pio-pkgs;
meta = with lib; {
description = "An open source ecosystem for IoT development";
homepage = "https://platformio.org";
maintainers = with maintainers; [ mog ];
license = licenses.asl20;
platforms = with platforms; linux;
};
extraInstallCommands = ''
mkdir -p $out/lib/udev/rules.d
ln -s $out/bin/platformio $out/bin/pio
ln -s ${src}/scripts/99-platformio-udev.rules $out/lib/udev/rules.d/99-platformio-udev.rules
'';
runScript = "platformio";
}