2020-11-24 20:58:05 +00:00
|
|
|
{ lib, buildFHSUserEnv, version, src }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
pio-pkgs = pkgs:
|
|
|
|
let
|
|
|
|
python = pkgs.python3.override {
|
|
|
|
packageOverrides = self: super: {
|
2020-11-24 20:58:05 +00:00
|
|
|
platformio = self.callPackage ./core.nix { inherit version src; };
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
2022-06-16 17:23:12 +00:00
|
|
|
in
|
|
|
|
(with pkgs; [
|
2020-04-24 23:36:52 +00:00
|
|
|
zlib
|
|
|
|
git
|
2022-06-16 17:23:12 +00:00
|
|
|
xdg-user-dirs
|
2020-04-24 23:36:52 +00:00
|
|
|
]) ++ (with python.pkgs; [
|
|
|
|
python
|
|
|
|
setuptools
|
|
|
|
pip
|
|
|
|
bottle
|
|
|
|
platformio
|
|
|
|
]);
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
in
|
|
|
|
buildFHSUserEnv {
|
2020-04-24 23:36:52 +00:00
|
|
|
name = "platformio";
|
|
|
|
|
|
|
|
targetPkgs = pio-pkgs;
|
2021-09-18 10:52:07 +00:00
|
|
|
# disabled temporarily because fastdiff no longer support 32bit
|
|
|
|
# multiPkgs = pio-pkgs;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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 = ''
|
2020-07-18 16:06:22 +00:00
|
|
|
mkdir -p $out/lib/udev/rules.d
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
ln -s $out/bin/platformio $out/bin/pio
|
2020-07-18 16:06:22 +00:00
|
|
|
ln -s ${src}/scripts/99-platformio-udev.rules $out/lib/udev/rules.d/99-platformio-udev.rules
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
runScript = "platformio";
|
|
|
|
}
|