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
|
2022-11-21 17:40:18 +00:00
|
|
|
python = pkgs.python3;
|
|
|
|
platformio = python.pkgs.callPackage ./core.nix { inherit version src; };
|
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
|
2023-02-02 18:25:31 +00:00
|
|
|
ln -s ${src}/platformio/assets/system/99-platformio-udev.rules $out/lib/udev/rules.d/99-platformio-udev.rules
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
runScript = "platformio";
|
|
|
|
}
|