From c84537016b769dfdd3c44d0d9306a534cc256cf0 Mon Sep 17 00:00:00 2001 From: Alvar Penning Date: Sat, 12 Sep 2020 12:45:52 +0200 Subject: [PATCH] platformio: 4.3.4 -> 5.0.1 --- .../arduino/platformio/chrootenv.nix | 4 +- pkgs/development/arduino/platformio/core.nix | 56 +++++++++++++------ .../platformio/missing-udev-rules-nixos.patch | 10 ++-- .../use-local-spdx-license-list.patch | 13 ++--- 4 files changed, 50 insertions(+), 33 deletions(-) diff --git a/pkgs/development/arduino/platformio/chrootenv.nix b/pkgs/development/arduino/platformio/chrootenv.nix index 62a1d190a00af9..91300bda8f1cfb 100644 --- a/pkgs/development/arduino/platformio/chrootenv.nix +++ b/pkgs/development/arduino/platformio/chrootenv.nix @@ -22,8 +22,8 @@ let src = fetchFromGitHub { owner = "platformio"; repo = "platformio-core"; - rev = "v4.3.4"; - sha256 = "0vf2j79319ypr4yrdmx84853igkb188sjfvlxgw06rlsvsm3kacq"; + rev = "v5.0.1"; + sha256 = "01xh61ldilg6fg95l1p870rld2xffhnl9f9ndvbi5jdn8q634pmw"; }; diff --git a/pkgs/development/arduino/platformio/core.nix b/pkgs/development/arduino/platformio/core.nix index 891d613da51236..835e0c692e4b4d 100644 --- a/pkgs/development/arduino/platformio/core.nix +++ b/pkgs/development/arduino/platformio/core.nix @@ -9,33 +9,57 @@ 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_ci.py::test_ci_build_dir" "commands/test_ci.py::test_ci_keep_build_dir" - "commands/test_init.py::test_init_enable_auto_uploading" + "commands/test_ci.py::test_ci_lib_and_board" + "commands/test_ci.py::test_ci_project_conf" "commands/test_init.py::test_init_custom_framework" - "commands/test_init.py::test_init_incorrect_board" + "commands/test_init.py::test_init_duplicated_boards" + "commands/test_init.py::test_init_enable_auto_uploading" "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_ide_vscode" + "commands/test_init.py::test_init_incorrect_board" "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_registry" "commands/test_lib.py::test_global_install_repository" "commands/test_lib.py::test_global_lib_list" + "commands/test_lib.py::test_global_lib_uninstall" + "commands/test_lib.py::test_global_lib_update" + "commands/test_lib.py::test_global_lib_update_check" + "commands/test_lib.py::test_install_duplicates" + "commands/test_lib.py::test_lib_show" + "commands/test_lib.py::test_lib_stats" + "commands/test_lib.py::test_saving_deps" + "commands/test_lib.py::test_search" + "commands/test_lib.py::test_update" + "commands/test_lib_complex.py::test_global_install_archive" + "commands/test_lib_complex.py::test_global_install_registry" + "commands/test_lib_complex.py::test_global_install_repository" + "commands/test_lib_complex.py::test_global_lib_list" + "commands/test_lib_complex.py::test_global_lib_uninstall" + "commands/test_lib_complex.py::test_global_lib_update" + "commands/test_lib_complex.py::test_global_lib_update_check" + "commands/test_lib_complex.py::test_install_duplicates" + "commands/test_lib_complex.py::test_lib_show" + "commands/test_lib_complex.py::test_lib_stats" + "commands/test_lib_complex.py::test_search" "commands/test_test.py::test_local_env" + "commands/test_test.py::test_multiple_env_build" + "commands/test_test.py::test_setup_teardown_are_compilable" + "package/test_manager.py::test_download" + "package/test_manager.py::test_install_force" + "package/test_manager.py::test_install_from_registry" + "package/test_manager.py::test_install_lib_depndencies" + "package/test_manager.py::test_registry" + "package/test_manager.py::test_uninstall" + "package/test_manager.py::test_update_with_metadata" + "package/test_manager.py::test_update_without_metadata" "test_builder.py::test_build_flags" "test_builder.py::test_build_unflags" - "test_builder.py::test_debug_default_build_flags" "test_builder.py::test_debug_custom_build_flags" + "test_builder.py::test_debug_default_build_flags" "test_misc.py::test_api_cache" "test_misc.py::test_ping_internet_ips" "test_misc.py::test_platformio_cli" @@ -51,14 +75,14 @@ let in buildPythonApplication rec { pname = "platformio"; - version = "4.3.4"; + version = "5.0.1"; # pypi tarballs don't contain tests - https://github.com/platformio/platformio-core/issues/1964 src = fetchFromGitHub { owner = "platformio"; repo = "platformio-core"; rev = "v${version}"; - sha256 = "0vf2j79319ypr4yrdmx84853igkb188sjfvlxgw06rlsvsm3kacq"; + sha256 = "01xh61ldilg6fg95l1p870rld2xffhnl9f9ndvbi5jdn8q634pmw"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/arduino/platformio/missing-udev-rules-nixos.patch b/pkgs/development/arduino/platformio/missing-udev-rules-nixos.patch index f29b93cef4d0b4..36af82245c5328 100644 --- a/pkgs/development/arduino/platformio/missing-udev-rules-nixos.patch +++ b/pkgs/development/arduino/platformio/missing-udev-rules-nixos.patch @@ -1,13 +1,11 @@ diff --git a/platformio/exception.py b/platformio/exception.py -index d291ad7f..4761a35b 100644 +index ef1d3bab..445174fc 100644 --- a/platformio/exception.py +++ b/platformio/exception.py -@@ -195,7 +195,8 @@ class MissedUdevRules(InvalidUdevRules): - +@@ -57,6 +57,7 @@ class MissedUdevRules(InvalidUdevRules): MESSAGE = ( - "Warning! Please install `99-platformio-udev.rules`. \nMode details: " -- "https://docs.platformio.org/en/latest/faq.html#platformio-udev-rules" -+ "https://docs.platformio.org/en/latest/faq.html#platformio-udev-rules\n" + "Warning! Please install `99-platformio-udev.rules`. \nMore details: " + "https://docs.platformio.org/page/faq.html#platformio-udev-rules" + "On NixOS add the platformio package to services.udev.packages" ) diff --git a/pkgs/development/arduino/platformio/use-local-spdx-license-list.patch b/pkgs/development/arduino/platformio/use-local-spdx-license-list.patch index 953eb3c9289360..511d81c3b012d6 100644 --- a/pkgs/development/arduino/platformio/use-local-spdx-license-list.patch +++ b/pkgs/development/arduino/platformio/use-local-spdx-license-list.patch @@ -1,16 +1,11 @@ diff --git a/platformio/package/manifest/schema.py b/platformio/package/manifest/schema.py -index be49b3ee..d1390a88 100644 +index f293ba5a..a818271f 100644 --- a/platformio/package/manifest/schema.py +++ b/platformio/package/manifest/schema.py -@@ -240,9 +240,5 @@ class ManifestSchema(BaseSchema): +@@ -252,5 +252,4 @@ class ManifestSchema(BaseSchema): @staticmethod @memoized(expire="1h") def load_spdx_licenses(): -- r = requests.get( -- "https://raw.githubusercontent.com/spdx/license-list-data" -- "/v3.9/json/licenses.json" -- ) -- r.raise_for_status() -- return r.json() -+ import json +- spdx_data_url = "https://dl.bintray.com/platformio/dl-misc/spdx-licenses-3.json" +- return json.loads(fetch_remote_content(spdx_data_url)) + return json.load(open("@SPDX_LICENSE_LIST_DATA@/json/licenses.json"))