nixpkgs/pkgs/development/embedded/platformio/use-local-spdx-license-list.patch
2022-08-16 11:58:12 -04:00

23 lines
980 B
Diff

diff --git a/platformio/package/manifest/schema.py b/platformio/package/manifest/schema.py
index 1e5f935a..26d1ac6a 100644
--- a/platformio/package/manifest/schema.py
+++ b/platformio/package/manifest/schema.py
@@ -276,9 +276,12 @@ class ManifestSchema(BaseSchema):
@staticmethod
@memoized(expire="1h")
def load_spdx_licenses():
- version = "3.18"
- 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))
+ # version = "3.18"
+ # 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