about summary refs log tree commit diff
path: root/pkgs/development/arduino/platformio/chrootenv.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/arduino/platformio/chrootenv.nix')
-rw-r--r--pkgs/development/arduino/platformio/chrootenv.nix41
1 files changed, 29 insertions, 12 deletions
diff --git a/pkgs/development/arduino/platformio/chrootenv.nix b/pkgs/development/arduino/platformio/chrootenv.nix
index 69182c3aa0d8..f46e705fb901 100644
--- a/pkgs/development/arduino/platformio/chrootenv.nix
+++ b/pkgs/development/arduino/platformio/chrootenv.nix
@@ -1,23 +1,40 @@
-{ stdenv, lib, buildFHSUserEnv
-}:
+{ lib, buildFHSUserEnv }:
+
 let
-  pio-pkgs = pkgs: (with pkgs;
-    [
-      python27Packages.python
-      python27Packages.setuptools
-      python27Packages.pip
-      python27Packages.bottle
-      python27Packages.platformio
+  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";
+            };
+          });
+
+          platformio = self.callPackage ./core.nix { };
+        };
+      };
+    in (with pkgs; [
       zlib
+    ]) ++ (with python.pkgs; [
+      python
+      setuptools
+      pip
+      bottle
+      platformio
     ]);
-in
-buildFHSUserEnv {
+
+in buildFHSUserEnv {
   name = "platformio";
 
   targetPkgs = pio-pkgs;
   multiPkgs = pio-pkgs;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "An open source ecosystem for IoT development";
     homepage = http://platformio.org;
     maintainers = with maintainers; [ mog ];