mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
Merge pull request #12062 from mogorman/platformio
platformio: init at 2.7.0
This commit is contained in:
commit
091c74b1c8
5 changed files with 92 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
{ runCommand, lib, writeText, writeScriptBin, stdenv, bash, ruby } :
|
||||
{ env, runScript ? "${bash}/bin/bash", extraBindMounts ? [], extraInstallCommands ? "" } :
|
||||
{ env, runScript ? "${bash}/bin/bash", extraBindMounts ? [], extraInstallCommands ? "", importMeta ? {} } :
|
||||
|
||||
let
|
||||
name = env.pname;
|
||||
|
@ -26,6 +26,7 @@ let
|
|||
'';
|
||||
|
||||
in runCommand name {
|
||||
meta = importMeta;
|
||||
passthru.env =
|
||||
runCommand "${name}-shell-env" {
|
||||
shellHook = ''
|
||||
|
|
33
pkgs/development/arduino/platformio/chrootenv.nix
Normal file
33
pkgs/development/arduino/platformio/chrootenv.nix
Normal file
|
@ -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";
|
||||
}
|
11
pkgs/development/arduino/platformio/default.nix
Normal file
11
pkgs/development/arduino/platformio/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
{ pkgs, newScope }:
|
||||
|
||||
let
|
||||
callPackage = newScope self;
|
||||
|
||||
self = rec {
|
||||
platformio-chrootenv = callPackage ./chrootenv.nix { };
|
||||
};
|
||||
|
||||
in self
|
|
@ -279,10 +279,11 @@ let
|
|||
};
|
||||
|
||||
buildFHSUserEnv = args: userFHSEnv {
|
||||
env = buildFHSEnv (removeAttrs args [ "runScript" "extraBindMounts" "extraInstallCommands" ]);
|
||||
env = buildFHSEnv (removeAttrs args [ "runScript" "extraBindMounts" "extraInstallCommands" "meta" ]);
|
||||
runScript = args.runScript or "bash";
|
||||
extraBindMounts = args.extraBindMounts or [];
|
||||
extraInstallCommands = args.extraInstallCommands or "";
|
||||
importMeta = args.meta or {};
|
||||
};
|
||||
|
||||
buildMaven = callPackage ../build-support/build-maven.nix {};
|
||||
|
@ -2759,6 +2760,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 {
|
||||
|
|
|
@ -2800,6 +2800,26 @@ in modules // {
|
|||
};
|
||||
};
|
||||
|
||||
click_5 = buildPythonPackage rec {
|
||||
name = "click-5.1";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://pypi.python.org/packages/source/c/click/${name}.tar.gz";
|
||||
sha256 = "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337";
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = http://click.pocoo.org/;
|
||||
description = "Create beautiful command line interfaces in Python";
|
||||
longDescription = ''
|
||||
A Python package for creating beautiful command line interfaces in a
|
||||
composable way, with as little code as necessary.
|
||||
'';
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ mog ];
|
||||
};
|
||||
};
|
||||
|
||||
click-log = buildPythonPackage rec {
|
||||
version = "0.1.1";
|
||||
name = "click-log-${version}";
|
||||
|
@ -14037,6 +14057,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";
|
||||
|
|
Loading…
Reference in a new issue