1{ 2 lib, 3 stdenv, 4 fetchurl, 5}: 6 7let 8 fetch_librusty_v8 = 9 args: 10 fetchurl { 11 name = "librusty_v8-${args.version}"; 12 url = "https://github.com/denoland/rusty_v8/releases/download/v${args.version}/librusty_v8_release_${stdenv.hostPlatform.rust.rustcTarget}.a.gz"; 13 sha256 = 14 args.shas.${stdenv.hostPlatform.system} 15 or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); 16 meta = { 17 inherit (args) version; 18 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 19 }; 20 }; 21in 22fetch_librusty_v8 { 23 version = "0.105.1"; 24 shas = { 25 x86_64-linux = "sha256-f7aDA74Jn2h4rp9sACGHX4DBbN6yevgWCEKdfI1fJDU="; 26 aarch64-linux = "sha256-vuEP7in+A/PrBXSunRq1SC77dOuMiScsKcA712AuNuk="; 27 x86_64-darwin = "sha256-sNe2VCwZvy64jdbPwx7pZ91fFRv1xosOcGiAtSPbt8A="; 28 aarch64-darwin = "sha256-GmwTJADMxArwOvRN/w5KVmWGc1+WfraBc/wWe7dxHMg="; 29 }; 30}