diff --git a/lib.nix b/lib.nix index 562153a..e165e00 100644 --- a/lib.nix +++ b/lib.nix @@ -27,9 +27,11 @@ with builtins; rec { else if system == "i686-darwin" then lib.findFirst ({host, ...}: (match "i[3456]86-apple-darwin.*" host) != null) null systems else if system == "aarch64-linux" then - lib.findFirst ({host, ...}: (match "(aarch64|arm64)-linux-gnu" host) != null) null systems + # tools.go uses regexp.MatchString which will also return true for substring matches, so we add a .* to the regex + lib.findFirst ({host, ...}: (match "(aarch64|arm64)-linux-gnu.*" host) != null) null systems else if system == "x86_64-linux" then - lib.findFirst ({host, ...}: (match "x86_64-.*linux-gnu" host) != null) null systems + # also add a .* to the regex here though it is not necessary in the current dataset (March 2024) + lib.findFirst ({host, ...}: (match "x86_64-.*linux-gnu.*" host) != null) null systems else null; convertHash = hash: let m = (match "(SHA-256|SHA-1|MD5):(.*)" hash);