diff --git a/pkgs/development/arduino/platformio/chrootenv.nix b/pkgs/development/arduino/platformio/chrootenv.nix new file mode 100644 index 00000000000..4aad955ec24 --- /dev/null +++ b/pkgs/development/arduino/platformio/chrootenv.nix @@ -0,0 +1,33 @@ +{ lib, buildFHSUserEnv, platformio, stdenv }: + +buildFHSUserEnv { + name = "platformio"; + + targetPkgs = pkgs: (with pkgs; + [ + python27Packages.python + python27Packages.setuptools + python27Packages.pip + python27Packages.bottle + python27Packages.platformio + zlib + ]); + multiPkgs = pkgs: (with pkgs; + [ + python27Packages.python + python27Packages.setuptools + python27Packages.pip + python27Packages.bottle + zlib + python27Packages.platformio + ]); + + meta = with stdenv.lib; { + description = "An open source ecosystem for IoT development"; + homepage = http://platformio.org; + maintainers = with maintainers; [ mog ]; + license = licenses.asl20; + }; + + runScript = "platformio"; +} diff --git a/pkgs/development/arduino/platformio/default.nix b/pkgs/development/arduino/platformio/default.nix new file mode 100644 index 00000000000..dfdd8141aaa --- /dev/null +++ b/pkgs/development/arduino/platformio/default.nix @@ -0,0 +1,11 @@ + +{ pkgs, newScope }: + +let + callPackage = newScope self; + + self = rec { + platformio-chrootenv = callPackage ./chrootenv.nix { }; + }; + +in self diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b6f85d1adf7..baf60ddbd92 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2747,6 +2747,9 @@ let plan9port = callPackage ../tools/system/plan9port { }; + platformioPackages = callPackage ../development/arduino/platformio { }; + platformio = platformioPackages.platformio-chrootenv.override {}; + plex = callPackage ../servers/plex { }; ploticus = callPackage ../tools/graphics/ploticus { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8d8935a6354..3a8dca6c33b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13780,6 +13780,27 @@ in modules // { propagatedBuildInputs = with self; [ unittest2 ]; }; + platformio = buildPythonPackage rec { + name = "platformio-${version}"; + version="2.7.0"; + + disabled = isPy3k || isPyPy; + + src = pkgs.fetchurl { + url = "https://pypi.python.org/packages/source/p/platformio/platformio-${version}.tar.gz"; + sha256 = "0bjp8gapd8v5az0xvsgh44zyma5kazhhbq266fk092i2q348zbv6"; + }; + + propagatedBuildInputs = with self; [ click_5 requests2 bottle pyserial lockfile colorama]; + + meta = with stdenv.lib; { + description = "An open source ecosystem for IoT development"; + homepage = http://platformio.org; + maintainers = with maintainers; [ mog ]; + license = licenses.asl20; + }; + }; + pylibconfig2 = buildPythonPackage rec { name = "pylibconfig2-${version}"; version = "0.2.4";