diff options
author | Peter Hoeg <peter@hoeg.com> | 2018-11-01 23:16:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-01 23:16:44 +0800 |
commit | 7b5a3294493b3e983d7cb5d5c5347999dc7d4092 (patch) | |
tree | 18bdfc6e5a34d9878911c4354ac993d764deaf63 /pkgs | |
parent | 38db6fdfb9672a0206a2042447132094bc05a5ea (diff) | |
parent | 718d3aea7ca70cb371282b7cca15c287a74553cc (diff) | |
download | nixlib-7b5a3294493b3e983d7cb5d5c5347999dc7d4092.tar nixlib-7b5a3294493b3e983d7cb5d5c5347999dc7d4092.tar.gz nixlib-7b5a3294493b3e983d7cb5d5c5347999dc7d4092.tar.bz2 nixlib-7b5a3294493b3e983d7cb5d5c5347999dc7d4092.tar.lz nixlib-7b5a3294493b3e983d7cb5d5c5347999dc7d4092.tar.xz nixlib-7b5a3294493b3e983d7cb5d5c5347999dc7d4092.tar.zst nixlib-7b5a3294493b3e983d7cb5d5c5347999dc7d4092.zip |
Merge pull request #49460 from peterhoeg/u/pio
platformio: 3.5.3 -> 3.6.1
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/arduino/platformio/core.nix | 69 |
1 files changed, 61 insertions, 8 deletions
diff --git a/pkgs/development/arduino/platformio/core.nix b/pkgs/development/arduino/platformio/core.nix index de0585309996..5489adc5399d 100644 --- a/pkgs/development/arduino/platformio/core.nix +++ b/pkgs/development/arduino/platformio/core.nix @@ -1,17 +1,57 @@ -{ stdenv, buildPythonPackage, fetchPypi +{ stdenv, lib, buildPythonApplication, fetchFromGitHub , bottle, click, colorama , lockfile, pyserial, requests -, semantic-version +, pytest, semantic-version, tox , git }: -buildPythonPackage rec { +let + args = lib.concatStringsSep " " ((map (e: "--deselect tests/${e}") [ + "commands/test_ci.py::test_ci_boards" + "commands/test_ci.py::test_ci_project_conf" + "commands/test_ci.py::test_ci_lib_and_board" + "commands/test_init.py::test_init_enable_auto_uploading" + "commands/test_init.py::test_init_custom_framework" + "commands/test_init.py::test_init_incorrect_board" + "commands/test_init.py::test_init_ide_atom" + "commands/test_init.py::test_init_ide_eclipse" + "commands/test_init.py::test_init_duplicated_boards" + "commands/test_init.py::test_init_special_board" + "commands/test_lib.py::test_search" + "commands/test_lib.py::test_install_duplicates" + "commands/test_lib.py::test_global_lib_update_check" + "commands/test_lib.py::test_global_lib_update" + "commands/test_lib.py::test_global_lib_uninstall" + "commands/test_lib.py::test_lib_show" + "commands/test_lib.py::test_lib_stats" + "commands/test_lib.py::test_global_install_registry" + "commands/test_lib.py::test_global_install_archive" + "commands/test_lib.py::test_global_install_repository" + "commands/test_lib.py::test_global_lib_list" + "commands/test_test.py::test_local_env" + "test_builder.py::test_build_flags" + "test_builder.py::test_build_unflags" + "test_misc.py::test_api_cache" + "test_misc.py::test_ping_internet_ips" + "test_pkgmanifest.py::test_packages" + ]) ++ (map (e: "--ignore=tests/${e}") [ + "commands/test_boards.py" + "commands/test_platform.py" + "commands/test_update.py" + "test_maintenance.py" + "test_ino2cpp.py" + ])); + +in buildPythonApplication rec { pname = "platformio"; - version = "3.5.3"; + version = "3.6.1"; - src = fetchPypi { - inherit pname version; - sha256 = "1l4s2xh1p9h767amk9zapzivz4irl2y3kff3dna6icvsgq6rz011"; + # pypi tarball doesn't contain tests + src = fetchFromGitHub { + owner = "platformio"; + repo = "platformio-core"; + rev = "v${version}"; + sha256 = "01xz9figqrzb0m9467q14lg51vmgq0hbaap0xdx08n5v2ycmzj0v"; }; propagatedBuildInputs = [ @@ -19,12 +59,25 @@ buildPythonPackage rec { pyserial requests semantic-version ]; + HOME = "/tmp"; + + checkInputs = [ pytest tox ]; + + checkPhase = '' + runHook preCheck + + py.test -v tests ${args} + + runHook postCheck + ''; + patches = [ ./fix-searchpath.patch ]; meta = with stdenv.lib; { + broken = stdenv.isAarch64; description = "An open source ecosystem for IoT development"; homepage = http://platformio.org; - maintainers = with maintainers; [ mog makefu ]; license = licenses.asl20; + maintainers = with maintainers; [ mog makefu ]; }; } |