summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2022-07-17 18:55:46 +0200
committerMartin Weinelt <hexa@darmstadt.ccc.de>2022-07-21 22:35:25 +0200
commit94c1f11caa747184bcc247d4dc8bb9791bcf8ca1 (patch)
tree8ac70871a1ba72ec4f24d548cba1eef72d8e1bc0
parentb8c0d17f95970926a1a73b79faea8c2beb22990f (diff)
downloadnixpkgs-94c1f11caa747184bcc247d4dc8bb9791bcf8ca1.tar
nixpkgs-94c1f11caa747184bcc247d4dc8bb9791bcf8ca1.tar.gz
nixpkgs-94c1f11caa747184bcc247d4dc8bb9791bcf8ca1.tar.bz2
nixpkgs-94c1f11caa747184bcc247d4dc8bb9791bcf8ca1.tar.lz
nixpkgs-94c1f11caa747184bcc247d4dc8bb9791bcf8ca1.tar.xz
nixpkgs-94c1f11caa747184bcc247d4dc8bb9791bcf8ca1.tar.zst
nixpkgs-94c1f11caa747184bcc247d4dc8bb9791bcf8ca1.zip
platformio: 6.0.1 -> 6.0.2
-rw-r--r--pkgs/development/embedded/platformio/core.nix100
-rw-r--r--pkgs/development/embedded/platformio/default.nix4
-rw-r--r--pkgs/development/embedded/platformio/missing-udev-rules-nixos.patch2
3 files changed, 51 insertions, 55 deletions
diff --git a/pkgs/development/embedded/platformio/core.nix b/pkgs/development/embedded/platformio/core.nix
index 1b8a6bd896f..9bb197c0bd4 100644
--- a/pkgs/development/embedded/platformio/core.nix
+++ b/pkgs/development/embedded/platformio/core.nix
@@ -6,25 +6,24 @@
 , version, src
 }:
 
-let
-  python = python3.override {
-    packageOverrides = self: super: {
-      starlette = super.starlette.overridePythonAttrs (oldAttrs: rec {
-        version = "0.20.0";
-        src = fetchFromGitHub {
-          owner = "encode";
-          repo = "starlette";
-          rev = version;
-          sha256 = "sha256-bSgPjKqM262PSufz1LHwrdM+uU8xO55Mifv66HRN02Y=";
-        };
-      });
-    };
-  };
-in
-with python.pkgs; buildPythonApplication rec {
+with python3.pkgs; buildPythonApplication rec {
   pname = "platformio";
   inherit version src;
 
+  patches = [
+    ./fix-searchpath.patch
+    ./use-local-spdx-license-list.patch
+    ./missing-udev-rules-nixos.patch
+  ];
+
+  postPatch = ''
+    substitute platformio/package/manifest/schema.py platformio/package/manifest/schema.py \
+      --subst-var-by SPDX_LICENSE_LIST_DATA '${spdx-license-list-data.json}'
+
+    substituteInPlace setup.py \
+      --replace 'uvicorn==%s" % ("0.17.*"' 'uvicorn==%s" % ("0.18.*"'
+  '';
+
   propagatedBuildInputs = [
     aiofiles
     ajsonrpc
@@ -47,15 +46,43 @@ with python.pkgs; buildPythonApplication rec {
     zeroconf
   ];
 
-  HOME = "/tmp";
+  preCheck = ''
+    export HOME=$(mktemp -d)
+    export PATH=$PATH:$out/bin
+  '';
 
   checkInputs = [
     jsondiff
     pytestCheckHook
-    tox
   ];
 
-  pytestFlagsArray = (map (e: "--deselect tests/${e}") [
+  disabledTestPaths = [
+    "tests/commands/pkg/test_install.py"
+    "tests/commands/pkg/test_list.py"
+    "tests/commands/pkg/test_outdated.py"
+    "tests/commands/pkg/test_search.py"
+    "tests/commands/pkg/test_show.py"
+    "tests/commands/pkg/test_uninstall.py"
+    "tests/commands/pkg/test_update.py"
+    "tests/commands/test_boards.py"
+    "tests/commands/test_check.py"
+    "tests/commands/test_platform.py"
+    "tests/commands/test_run.py"
+    "tests/commands/test_test.py"
+    "tests/misc/test_maintenance.py"
+    # requires internet connection
+    "tests/misc/ino2cpp/test_ino2cpp.py"
+  ];
+
+  disabledTests = [
+    # requires internet connection
+    "test_api_cache"
+    "test_ping_internet_ips"
+  ];
+
+  pytestFlagsArray = [
+    "tests"
+  ] ++ (map (e: "--deselect tests/${e}") [
     "commands/pkg/test_exec.py::test_pkg_specified"
     "commands/pkg/test_exec.py::test_unrecognized_options"
     "commands/test_ci.py::test_ci_boards"
@@ -112,44 +139,13 @@ with python.pkgs; buildPythonApplication rec {
     "test_misc.py::test_ping_internet_ips"
     "test_misc.py::test_platformio_cli"
     "test_pkgmanifest.py::test_packages"
-  ]) ++ (map (e: "--ignore=tests/${e}") [
-    "commands/pkg/test_install.py"
-    "commands/pkg/test_list.py"
-    "commands/pkg/test_outdated.py"
-    "commands/pkg/test_search.py"
-    "commands/pkg/test_show.py"
-    "commands/pkg/test_uninstall.py"
-    "commands/pkg/test_update.py"
-    "commands/test_boards.py"
-    "commands/test_check.py"
-    "commands/test_platform.py"
-    "commands/test_run.py"
-    "commands/test_test.py"
-    "commands/test_update.py"
-    "test_ino2cpp.py"
-    "test_maintenance.py"
-  ]) ++ [
-    "tests"
-  ];
-
-  patches = [
-    ./fix-searchpath.patch
-    ./use-local-spdx-license-list.patch
-    ./missing-udev-rules-nixos.patch
-  ];
-
-  postPatch = ''
-    substitute platformio/package/manifest/schema.py platformio/package/manifest/schema.py \
-      --subst-var-by SPDX_LICENSE_LIST_DATA '${spdx-license-list-data.json}'
-
-    substituteInPlace setup.py \
-      --replace 'uvicorn==%s" % ("0.17.*"' 'uvicorn==%s" % ("0.18.*"'
-  '';
+  ]);
 
   meta = with lib; {
     description = "An open source ecosystem for IoT development";
     homepage = "https://platformio.org";
     license = licenses.asl20;
     maintainers = with maintainers; [ mog makefu ];
+    broken = stdenv.isAarch64;
   };
 }
diff --git a/pkgs/development/embedded/platformio/default.nix b/pkgs/development/embedded/platformio/default.nix
index 000c23898ff..ad2d897af83 100644
--- a/pkgs/development/embedded/platformio/default.nix
+++ b/pkgs/development/embedded/platformio/default.nix
@@ -4,14 +4,14 @@
 let
   callPackage = newScope self;
 
-  version = "6.0.1";
+  version = "6.0.2";
 
   # 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 = "sha256-noLdQctAaMNmfuxI3iybHFx3Q9aTr3gZaUZ+/uO+fnA=";
+    sha256 = "sha256-yfUF9+M45ZSjmB275kTs8+/Q8Q5FMmr63e3Om8dPi2k=";
   };
 
   self = {
diff --git a/pkgs/development/embedded/platformio/missing-udev-rules-nixos.patch b/pkgs/development/embedded/platformio/missing-udev-rules-nixos.patch
index 36af82245c5..2a978496a19 100644
--- a/pkgs/development/embedded/platformio/missing-udev-rules-nixos.patch
+++ b/pkgs/development/embedded/platformio/missing-udev-rules-nixos.patch
@@ -5,7 +5,7 @@ index ef1d3bab..445174fc 100644
 @@ -57,6 +57,7 @@ class MissedUdevRules(InvalidUdevRules):
      MESSAGE = (
          "Warning! Please install `99-platformio-udev.rules`. \nMore details: "
-         "https://docs.platformio.org/page/faq.html#platformio-udev-rules"
+         "https://docs.platformio.org/en/latest/core/installation/udev-rules.html"
 +        "On NixOS add the platformio package to services.udev.packages"
      )