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

53 lines
1.2 KiB
Nix
Raw Normal View History

2018-04-07 23:00:21 +02:00
{ lib, buildFHSUserEnv }:
2018-01-09 19:59:33 +01:00
let
2018-04-07 23:00:21 +02:00
pio-pkgs = pkgs:
let
python = pkgs.python.override {
packageOverrides = self: super: {
# https://github.com/platformio/platformio-core/issues/349
click = super.click.overridePythonAttrs (oldAttrs: rec {
version = "5.1";
src = oldAttrs.src.override {
inherit version;
sha256 = "678c98275431fad324275dec63791e4a17558b40e5a110e20a82866139a85a5a";
};
postPatch = "";
2018-04-07 23:00:21 +02:00
});
platformio = self.callPackage ./core.nix { };
};
};
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;
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";
homepage = http://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 = ''
ln -s $out/bin/platformio $out/bin/pio
'';
2016-01-06 10:05:19 +01:00
runScript = "platformio";
}