git.iko.soy/typeable/nixpkgs
on master help sign in
platformio: 3.5.3 -> 3.6.1
commit718d3aea7ca70cb371282b7cca15c287a74553cc authorPeter Hoeg <peter@hoeg.com> dateTue 30 Oct 2018, 21:38 (8 years ago) parent45a419a
1 file changed+61−8
pkgs/development/arduino/platformio/core.nix+61−8
pkgs/development/arduino/platformio/core.nix+61−8
@@ -1,17 +1,57 @@
1−{ stdenv, buildPythonPackage, fetchPypi
1+{ stdenv, lib, buildPythonApplication, fetchFromGitHub
22, bottle, click, colorama
33, lockfile, pyserial, requests
4−, semantic-version
4+, pytest, semantic-version, tox
55, git
66}:
77
8−buildPythonPackage rec {
8+let
9+ args = lib.concatStringsSep " " ((map (e: "--deselect tests/${e}") [
10+ "commands/test_ci.py::test_ci_boards"
11+ "commands/test_ci.py::test_ci_project_conf"
12+ "commands/test_ci.py::test_ci_lib_and_board"
13+ "commands/test_init.py::test_init_enable_auto_uploading"
14+ "commands/test_init.py::test_init_custom_framework"
15+ "commands/test_init.py::test_init_incorrect_board"
16+ "commands/test_init.py::test_init_ide_atom"
17+ "commands/test_init.py::test_init_ide_eclipse"
18+ "commands/test_init.py::test_init_duplicated_boards"
19+ "commands/test_init.py::test_init_special_board"
20+ "commands/test_lib.py::test_search"
21+ "commands/test_lib.py::test_install_duplicates"
22+ "commands/test_lib.py::test_global_lib_update_check"
23+ "commands/test_lib.py::test_global_lib_update"
24+ "commands/test_lib.py::test_global_lib_uninstall"
25+ "commands/test_lib.py::test_lib_show"
26+ "commands/test_lib.py::test_lib_stats"
27+ "commands/test_lib.py::test_global_install_registry"
28+ "commands/test_lib.py::test_global_install_archive"
29+ "commands/test_lib.py::test_global_install_repository"
30+ "commands/test_lib.py::test_global_lib_list"
31+ "commands/test_test.py::test_local_env"
32+ "test_builder.py::test_build_flags"
33+ "test_builder.py::test_build_unflags"
34+ "test_misc.py::test_api_cache"
35+ "test_misc.py::test_ping_internet_ips"
36+ "test_pkgmanifest.py::test_packages"
37+ ]) ++ (map (e: "--ignore=tests/${e}") [
38+ "commands/test_boards.py"
39+ "commands/test_platform.py"
40+ "commands/test_update.py"
41+ "test_maintenance.py"
42+ "test_ino2cpp.py"
43+ ]));
44+
45+in buildPythonApplication rec {
946 pname = "platformio";
10− version = "3.5.3";
47+ version = "3.6.1";
1148
12− src = fetchPypi {
13− inherit pname version;
14− sha256 = "1l4s2xh1p9h767amk9zapzivz4irl2y3kff3dna6icvsgq6rz011";
49+ # pypi tarball doesn't contain tests
50+ src = fetchFromGitHub {
51+ owner = "platformio";
52+ repo = "platformio-core";
53+ rev = "v${version}";
54+ sha256 = "01xz9figqrzb0m9467q14lg51vmgq0hbaap0xdx08n5v2ycmzj0v";
1555 };
1656
1757 propagatedBuildInputs = [
@@ -19,12 +59,25 @@ buildPythonPackage rec {
1959 pyserial requests semantic-version
2060 ];
2161
62+ HOME = "/tmp";
63+
64+ checkInputs = [ pytest tox ];
65+
66+ checkPhase = ''
67+ runHook preCheck
68+
69+ py.test -v tests ${args}
70+
71+ runHook postCheck
72+ '';
73+
2274 patches = [ ./fix-searchpath.patch ];
2375
2476 meta = with stdenv.lib; {
77+ broken = stdenv.isAarch64;
2578 description = "An open source ecosystem for IoT development";
2679 homepage = http://platformio.org;
27− maintainers = with maintainers; [ mog makefu ];
2880 license = licenses.asl20;
81+ maintainers = with maintainers; [ mog makefu ];
2982 };
3083}