deno: 1.36.0 -> 1.37.1

Also fix update script so it can find the v8 crate dependency version
Add cmake for building libz-sys (can't link to existing zlib-ng yet)
Add protoc for internal deno libs

+30 -23
+14 -4
pkgs/development/web/deno/default.nix
··· 3 3 , callPackage 4 4 , fetchFromGitHub 5 5 , rustPlatform 6 + , cmake 7 + , protobuf 6 8 , installShellFiles 7 9 , libiconv 8 10 , darwin ··· 11 13 12 14 rustPlatform.buildRustPackage rec { 13 15 pname = "deno"; 14 - version = "1.36.0"; 16 + version = "1.37.1"; 15 17 16 18 src = fetchFromGitHub { 17 19 owner = "denoland"; 18 20 repo = pname; 19 21 rev = "v${version}"; 20 - hash = "sha256-PV0Q/OtO4AkY3NMwIQIwU0DCkFqXifJFuHb+Q3rIQLI="; 22 + hash = "sha256-ZfICDkW6q4OLvpSZnRpa6i324OuLNuOHXuSOQ7/aUJ8="; 21 23 }; 22 24 23 - cargoHash = "sha256-w0Wr/mwn4Hdfxr7eBdZtpj3MbsMHDwAK2F7XaYEaMCk="; 25 + cargoHash = "sha256-n+6Hz9Q20vq1Bf/Ny7I3IpGbkEECjjBG8xHN1v0z0Pw="; 24 26 25 27 postPatch = '' 26 28 # upstream uses lld on aarch64-darwin for faster builds ··· 28 30 substituteInPlace .cargo/config.toml --replace '"-C", "link-arg=-fuse-ld=lld"' "" 29 31 ''; 30 32 31 - nativeBuildInputs = [ installShellFiles ]; 33 + # uses zlib-ng but can't dynamically link yet 34 + # https://github.com/rust-lang/libz-sys/issues/158 35 + nativeBuildInputs = [ 36 + # required by libz-ng-sys crate 37 + cmake 38 + # required by deno_kv crate 39 + protobuf 40 + installShellFiles 41 + ]; 32 42 buildInputs = lib.optionals stdenv.isDarwin ( 33 43 [ libiconv darwin.libobjc ] ++ 34 44 (with darwin.apple_sdk.frameworks; [ Security CoreServices Metal Foundation QuartzCore ])
+5 -5
pkgs/development/web/deno/librusty_v8.nix
··· 11 11 }; 12 12 in 13 13 fetch_librusty_v8 { 14 - version = "0.74.3"; 14 + version = "0.78.0"; 15 15 shas = { 16 - x86_64-linux = "sha256-8pa8nqA6rbOSBVnp2Q8/IQqh/rfYQU57hMgwU9+iz4A="; 17 - aarch64-linux = "sha256-3kXOV8rlCNbNBdXgOtd3S94qO+JIKyOByA4WGX+XVP0="; 18 - x86_64-darwin = "sha256-iBBVKZiSoo08YEQ8J/Rt1/5b7a+2xjtuS6QL/Wod5nQ="; 19 - aarch64-darwin = "sha256-Djnuc3l/jQKvBf1aej8LG5Ot2wPT0m5Zo1B24l1UHsM="; 16 + x86_64-linux = "sha256-1df7bH3ZdgIasZvvNH3iKQ4lmcGNq6ldgMV9nDgOC14="; 17 + aarch64-linux = "sha256-riSyGvOGwqL1hSAXpUvBju/3DN20THtg0NuIzn1m1M8="; 18 + x86_64-darwin = "sha256-4Nnkrj9GfliYUInb7SssqzFIDbV0XVxdEBC28klqBDM="; 19 + aarch64-darwin = "sha256-oepRKVb05zAUeZo2RN3Vca0CUQ+Fd1duIU3xOG+FEJw="; 20 20 }; 21 21 }
+2 -2
pkgs/development/web/deno/update/common.ts
··· 48 48 export const genValueRegExp = (key: string, regex: RegExp) => 49 49 new RegExp(`(?<=${key} = ")(${regex.source}|)(?=")`); 50 50 51 - export const logger = (name: string) => 52 - (...a: any) => console.log(`[${name}]`, ...a); 51 + export const logger = (name: string) => (...a: any) => 52 + console.log(`[${name}]`, ...a); 53 53 54 54 export const read = Deno.readTextFile; 55 55 export const write = Deno.writeTextFile;
+9 -12
pkgs/development/web/deno/update/librusty_v8.ts
··· 1 - import * as toml from "https://deno.land/std@0.148.0/encoding/toml.ts"; 2 - import { 3 - getExistingVersion, 4 - logger, 5 - run, 6 - write, 7 - } from "./common.ts"; 8 - 1 + import * as toml from "https://deno.land/std@0.202.0/toml/mod.ts"; 2 + import { getExistingVersion, logger, run, write } from "./common.ts"; 9 3 10 4 const log = logger("librusty_v8"); 11 5 ··· 18 12 sha256: string; 19 13 } 20 14 21 - const getLibrustyV8Version = async ( 15 + const getCargoLock = async ( 22 16 owner: string, 23 17 repo: string, 24 18 version: string, 25 19 ) => 26 - fetch(`https://github.com/${owner}/${repo}/raw/${version}/Cargo.toml`) 20 + fetch(`https://github.com/${owner}/${repo}/raw/${version}/Cargo.lock`) 27 21 .then((res) => res.text()) 28 - .then((txt) => toml.parse(txt).workspace.dependencies.v8.version); 22 + .then((txt) => toml.parse(txt)); 29 23 30 24 const fetchArchShaTasks = (version: string, arches: Architecture[]) => 31 25 arches.map( ··· 74 68 ) { 75 69 log("Starting librusty_v8 update"); 76 70 // 0.0.0 77 - const version = await getLibrustyV8Version(owner, repo, denoVersion); 71 + const cargoLockData = await getCargoLock(owner, repo, denoVersion); 72 + console.log(cargoLockData); 73 + const packageItem = cargoLockData.package.find(({ name }) => name === "v8"); 74 + const version = packageItem.version; 78 75 if (typeof version !== "string") { 79 76 throw "no librusty_v8 version"; 80 77 }