diff --git a/out-of-tree/nixGL/fetch.py b/out-of-tree/nixGL/fetch.py index a152704..11d0e3e 100755 --- a/out-of-tree/nixGL/fetch.py +++ b/out-of-tree/nixGL/fetch.py @@ -41,10 +41,6 @@ def req_monad(url: str, err_fn, then_fn): return then_fn(res.data) identity = lambda e: e -def _fail(msg: str|None=None): - if msg: - assert False, msg - assert False none_id = lambda _: None def get_sha256(version: str) -> str | None: diff --git a/out-of-tree/nixGL/nixGL.nix b/out-of-tree/nixGL/nixGL.nix index dfaaf11..8dd24ed 100644 --- a/out-of-tree/nixGL/nixGL.nix +++ b/out-of-tree/nixGL/nixGL.nix @@ -56,12 +56,13 @@ let done ''; }; + fetch_db = builtins.fromJSON (builtins.readFile ./nvidia_versions.json); top = rec { /* It contains the builder for different nvidia configuration, parametrized by the version of the driver and sha256 sum of the driver installer file. */ - nvidiaPackages = { version }: + nvidiaPackages = { version, sha256? fetch_db."${version}".sha256 }: let nvidiaDrivers = (linuxPackages.nvidia_x11.override { }).overrideAttrs (oldAttrs: { diff --git a/nvidia_versions.json b/out-of-tree/nixGL/nvidia_versions.json similarity index 100% rename from nvidia_versions.json rename to out-of-tree/nixGL/nvidia_versions.json