nixpkgs-suyu/pkgs/development/embedded/platformio/use-local-spdx-license-list.patch
Alvar Penning 848860d241 platformio: 5.2.1 -> 5.2.3
Next to bumping the patch version, two changed dependencies were pinned.
Furthermore, the SPDX patch was altered to correctly close the JSON file
as non-closed files are now also covered by the tests.
2021-11-08 18:29:16 +01:00

17 lines
718 B
Diff

diff --git a/platformio/package/manifest/schema.py b/platformio/package/manifest/schema.py
index 416dccfd..896c3649 100644
--- a/platformio/package/manifest/schema.py
+++ b/platformio/package/manifest/schema.py
@@ -253,9 +253,6 @@ class ManifestSchema(BaseSchema):
@staticmethod
@memoized(expire="1h")
def load_spdx_licenses():
- version = "3.14"
- spdx_data_url = (
- "https://raw.githubusercontent.com/spdx/license-list-data/"
- "v%s/json/licenses.json" % version
- )
- return json.loads(fetch_remote_content(spdx_data_url))
+ with open("@SPDX_LICENSE_LIST_DATA@/json/licenses.json") as f:
+ spdx = json.load(f)
+ return spdx