3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/arduino/platformio/chrootenv.nix
André-Patrick Bubel 9374c3f203
platformio: Fix building of overridden click package
The normal click package now applies a patch that doesn't work with the
older version used for platformio.
2018-06-19 19:00:03 +02:00

53 lines
1.2 KiB
Nix

{ lib, buildFHSUserEnv }:
let
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";
};
patches = [];
});
platformio = self.callPackage ./core.nix { };
};
};
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 = http://platformio.org;
maintainers = with maintainers; [ mog ];
license = licenses.asl20;
platforms = with platforms; linux;
};
extraInstallCommands = ''
ln -s $out/bin/platformio $out/bin/pio
'';
runScript = "platformio";
}