mirror of
https://github.com/terrapkg/packages.git
synced 2026-05-31 09:01:55 +00:00
chore: Backport NVIDIA AndaX (#4446)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// NVIDIA website parser module
|
||||
// This module is used to parse the NVIDIA website for the latest driver version
|
||||
|
||||
fn nvidia_component_list() {
|
||||
let series = "12.6.3";
|
||||
let url = `https://developer.download.nvidia.com/compute/cuda/redist/redistrib_${series}.json`;
|
||||
return get(url).json();
|
||||
}
|
||||
fn nvidia_component_version(component) {
|
||||
let components = nvidia_component_list();
|
||||
return components[component]["version"];
|
||||
}
|
||||
|
||||
fn nvidia_driver_version() {
|
||||
let driver = get("https://gfwsl.geforce.com/services_toolkit/services/com/nvidia/services/AjaxDriverService.php?func=DriverManualLookup&osID=12&languageCode=1033&numberOfResults=1&beta=0").json().IDS[0].downloadInfo.DisplayVersion;
|
||||
return(driver);
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import "andax/nvidia.rhai" as nvidia;
|
||||
|
||||
print(nvidia::nvidia_driver_version());
|
||||
Reference in New Issue
Block a user