nixpkgs/pkgs/development/embedded/platformio/chrootenv.nix

46 lines
1 KiB
Nix
Raw Normal View History

{ lib, buildFHSUserEnv, version, src }:
2018-04-07 23:00:21 +02:00
2018-01-09 19:59:33 +01:00
let
2018-04-07 23:00:21 +02:00
pio-pkgs = pkgs:
let
2019-09-04 07:59:22 +02:00
python = pkgs.python3.override {
2018-04-07 23:00:21 +02:00
packageOverrides = self: super: {
platformio = self.callPackage ./core.nix { inherit version src; };
2018-04-07 23:00:21 +02:00
};
};
in (with pkgs; [
2018-01-03 17:12:17 +01:00
zlib
git
2018-04-07 23:00:21 +02:00
]) ++ (with python.pkgs; [
python
setuptools
pip
bottle
platformio
2016-01-06 10:05:19 +01:00
]);
2018-04-07 23:00:21 +02:00
in buildFHSUserEnv {
2018-01-09 19:59:33 +01:00
name = "platformio";
targetPkgs = pio-pkgs;
# disabled temporarily because fastdiff no longer support 32bit
# multiPkgs = pio-pkgs;
2016-01-06 10:05:19 +01:00
2018-04-07 23:00:21 +02:00
meta = with lib; {
description = "An open source ecosystem for IoT development";
2019-09-04 07:59:22 +02:00
homepage = "https://platformio.org";
maintainers = with maintainers; [ mog ];
license = licenses.asl20;
platforms = with platforms; linux;
2016-01-06 10:05:19 +01:00
};
2018-01-03 17:12:17 +01:00
extraInstallCommands = ''
mkdir -p $out/lib/udev/rules.d
2018-01-03 17:12:17 +01:00
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
2018-01-03 17:12:17 +01:00
'';
2016-01-06 10:05:19 +01:00
runScript = "platformio";
}