nixpkgs/pkgs/development/arduino/platformio/use-local-spdx-license-list.patch

17 lines
648 B
Diff
Raw Normal View History

2020-01-19 22:51:45 +00:00
diff --git a/platformio/package/manifest/schema.py b/platformio/package/manifest/schema.py
2020-04-03 13:58:16 +00:00
index be49b3ee..d1390a88 100644
2020-01-19 22:51:45 +00:00
--- a/platformio/package/manifest/schema.py
+++ b/platformio/package/manifest/schema.py
2020-04-03 13:58:16 +00:00
@@ -240,9 +240,5 @@ class ManifestSchema(BaseSchema):
2020-01-19 22:51:45 +00:00
@staticmethod
@memoized(expire="1h")
def load_spdx_licenses():
- r = requests.get(
- "https://raw.githubusercontent.com/spdx/license-list-data"
2020-04-03 13:58:16 +00:00
- "/v3.8/json/licenses.json"
2020-01-19 22:51:45 +00:00
- )
- r.raise_for_status()
- return r.json()
+ import json
+ return json.load(open("@SPDX_LICENSE_LIST_DATA@/json/licenses.json"))