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 , callPackage 4 , fetchFromGitHub 5 , rustPlatform 6 , installShellFiles 7 , libiconv 8 , darwin ··· 11 12 rustPlatform.buildRustPackage rec { 13 pname = "deno"; 14 - version = "1.36.0"; 15 16 src = fetchFromGitHub { 17 owner = "denoland"; 18 repo = pname; 19 rev = "v${version}"; 20 - hash = "sha256-PV0Q/OtO4AkY3NMwIQIwU0DCkFqXifJFuHb+Q3rIQLI="; 21 }; 22 23 - cargoHash = "sha256-w0Wr/mwn4Hdfxr7eBdZtpj3MbsMHDwAK2F7XaYEaMCk="; 24 25 postPatch = '' 26 # upstream uses lld on aarch64-darwin for faster builds ··· 28 substituteInPlace .cargo/config.toml --replace '"-C", "link-arg=-fuse-ld=lld"' "" 29 ''; 30 31 - nativeBuildInputs = [ installShellFiles ]; 32 buildInputs = lib.optionals stdenv.isDarwin ( 33 [ libiconv darwin.libobjc ] ++ 34 (with darwin.apple_sdk.frameworks; [ Security CoreServices Metal Foundation QuartzCore ])
··· 3 , callPackage 4 , fetchFromGitHub 5 , rustPlatform 6 + , cmake 7 + , protobuf 8 , installShellFiles 9 , libiconv 10 , darwin ··· 13 14 rustPlatform.buildRustPackage rec { 15 pname = "deno"; 16 + version = "1.37.1"; 17 18 src = fetchFromGitHub { 19 owner = "denoland"; 20 repo = pname; 21 rev = "v${version}"; 22 + hash = "sha256-ZfICDkW6q4OLvpSZnRpa6i324OuLNuOHXuSOQ7/aUJ8="; 23 }; 24 25 + cargoHash = "sha256-n+6Hz9Q20vq1Bf/Ny7I3IpGbkEECjjBG8xHN1v0z0Pw="; 26 27 postPatch = '' 28 # upstream uses lld on aarch64-darwin for faster builds ··· 30 substituteInPlace .cargo/config.toml --replace '"-C", "link-arg=-fuse-ld=lld"' "" 31 ''; 32 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 + ]; 42 buildInputs = lib.optionals stdenv.isDarwin ( 43 [ libiconv darwin.libobjc ] ++ 44 (with darwin.apple_sdk.frameworks; [ Security CoreServices Metal Foundation QuartzCore ])
+5 -5
pkgs/development/web/deno/librusty_v8.nix
··· 11 }; 12 in 13 fetch_librusty_v8 { 14 - version = "0.74.3"; 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="; 20 }; 21 }
··· 11 }; 12 in 13 fetch_librusty_v8 { 14 + version = "0.78.0"; 15 shas = { 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 }; 21 }
+2 -2
pkgs/development/web/deno/update/common.ts
··· 48 export const genValueRegExp = (key: string, regex: RegExp) => 49 new RegExp(`(?<=${key} = ")(${regex.source}|)(?=")`); 50 51 - export const logger = (name: string) => 52 - (...a: any) => console.log(`[${name}]`, ...a); 53 54 export const read = Deno.readTextFile; 55 export const write = Deno.writeTextFile;
··· 48 export const genValueRegExp = (key: string, regex: RegExp) => 49 new RegExp(`(?<=${key} = ")(${regex.source}|)(?=")`); 50 51 + export const logger = (name: string) => (...a: any) => 52 + console.log(`[${name}]`, ...a); 53 54 export const read = Deno.readTextFile; 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 - 9 10 const log = logger("librusty_v8"); 11 ··· 18 sha256: string; 19 } 20 21 - const getLibrustyV8Version = async ( 22 owner: string, 23 repo: string, 24 version: string, 25 ) => 26 - fetch(`https://github.com/${owner}/${repo}/raw/${version}/Cargo.toml`) 27 .then((res) => res.text()) 28 - .then((txt) => toml.parse(txt).workspace.dependencies.v8.version); 29 30 const fetchArchShaTasks = (version: string, arches: Architecture[]) => 31 arches.map( ··· 74 ) { 75 log("Starting librusty_v8 update"); 76 // 0.0.0 77 - const version = await getLibrustyV8Version(owner, repo, denoVersion); 78 if (typeof version !== "string") { 79 throw "no librusty_v8 version"; 80 }
··· 1 + import * as toml from "https://deno.land/std@0.202.0/toml/mod.ts"; 2 + import { getExistingVersion, logger, run, write } from "./common.ts"; 3 4 const log = logger("librusty_v8"); 5 ··· 12 sha256: string; 13 } 14 15 + const getCargoLock = async ( 16 owner: string, 17 repo: string, 18 version: string, 19 ) => 20 + fetch(`https://github.com/${owner}/${repo}/raw/${version}/Cargo.lock`) 21 .then((res) => res.text()) 22 + .then((txt) => toml.parse(txt)); 23 24 const fetchArchShaTasks = (version: string, arches: Architecture[]) => 25 arches.map( ··· 68 ) { 69 log("Starting librusty_v8 update"); 70 // 0.0.0 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; 75 if (typeof version !== "string") { 76 throw "no librusty_v8 version"; 77 }