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