nixpkgs/pkgs/development/arduino/platformio/chrootenv.nix
Alvar Penning 160c5e9376 platformio: 5.0.2 -> 5.0.3
In addition to the version change, the source is managed in a central
location, since previously the same change had to be made in two places.
2020-11-24 14:36:19 +01:00

44 lines
986 B
Nix

{ lib, buildFHSUserEnv, version, src }:
let
pio-pkgs = pkgs:
let
python = pkgs.python3.override {
packageOverrides = self: super: {
platformio = self.callPackage ./core.nix { inherit version src; };
};
};
in (with pkgs; [
zlib
git
]) ++ (with python.pkgs; [
python
setuptools
pip
bottle
platformio
]);
in buildFHSUserEnv {
name = "platformio";
targetPkgs = pio-pkgs;
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";
}