nixpkgs/pkgs/development/arduino/platformio/core.nix

88 lines
2.8 KiB
Nix
Raw Normal View History

2018-10-30 14:38:57 +01:00
{ stdenv, lib, buildPythonApplication, fetchFromGitHub
2018-04-07 23:00:21 +02:00
, bottle, click, colorama
, lockfile, pyserial, requests
2019-09-04 07:59:22 +02:00
, pytest, semantic-version, tox, tabulate
2018-01-10 00:27:40 +01:00
, git
}:
2018-10-30 14:38:57 +01:00
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"
2019-04-05 10:15:13 +02:00
"commands/test_ci.py::test_ci_build_dir"
"commands/test_ci.py::test_ci_keep_build_dir"
2018-10-30 14:38:57 +01:00
"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"
2019-09-04 07:59:22 +02:00
"test_misc.py::test_platformio_cli"
2018-10-30 14:38:57 +01:00
"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";
2019-09-04 07:59:22 +02:00
version = "4.0.3";
# pypi tarballs don't contain tests - https://github.com/platformio/platformio-core/issues/1964
2018-10-30 14:38:57 +01:00
src = fetchFromGitHub {
owner = "platformio";
repo = "platformio-core";
rev = "v${version}";
2019-09-04 07:59:22 +02:00
sha256 = "1naaa53cc7n7zyqggqjvvgkcq8cyzngdf904y9ag0x1vvb70f8j9";
};
propagatedBuildInputs = [
2018-04-07 23:00:21 +02:00
bottle click colorama git lockfile
2018-01-18 16:02:44 +01:00
pyserial requests semantic-version
2019-09-04 07:59:22 +02:00
tabulate
];
2018-10-30 14:38:57 +01:00
HOME = "/tmp";
checkInputs = [ pytest tox ];
checkPhase = ''
runHook preCheck
py.test -v tests ${args}
runHook postCheck
'';
patches = [ ./fix-searchpath.patch ];
meta = with stdenv.lib; {
2018-10-30 14:38:57 +01:00
broken = stdenv.isAarch64;
description = "An open source ecosystem for IoT development";
homepage = http://platformio.org;
license = licenses.asl20;
2018-10-30 14:38:57 +01:00
maintainers = with maintainers; [ mog makefu ];
};
}