From dd50d1df59a01ae201bd1536635471a5348ee68a Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Wed, 3 Mar 2021 12:05:28 +0000 Subject: [PATCH 1/5] deno: 1.6.3 -> 1.8.0 Added aarch64-darwin as it's been manually complied and added to releases since 0.14.0 Removed fetchSubmodules as it couldn't fetch wpt at detached commit a51d36327febebc8634d7b523a7e620f4ebdbf26. Doesn't seem required for much other than testing. Added installCheckPhase Moved the librusty_v8 stuff within the preBuild phase and changed the names Skipped 1.7.X releases as there wasn't an aarch64-linux release of librusty_v8.a available --- pkgs/development/web/deno/default.nix | 64 +++++++++++++--------- pkgs/development/web/deno/deps.nix | 11 ++-- pkgs/development/web/deno/update/deps.ts | 6 +- pkgs/development/web/deno/update/update.ts | 1 + 4 files changed, 47 insertions(+), 35 deletions(-) diff --git a/pkgs/development/web/deno/default.nix b/pkgs/development/web/deno/default.nix index 013b365bce8d..18fd53bd94b7 100644 --- a/pkgs/development/web/deno/default.nix +++ b/pkgs/development/web/deno/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ stdenv +, lib , fetchurl , fetchFromGitHub , rust @@ -7,27 +8,18 @@ , Security , CoreServices }: -let - deps = import ./deps.nix { }; - arch = rust.toRustTarget stdenv.hostPlatform; - rustyV8Lib = with deps.rustyV8Lib; fetchurl { - url = "https://github.com/denoland/rusty_v8/releases/download/v${version}/librusty_v8_release_${arch}.a"; - sha256 = sha256s."${stdenv.hostPlatform.system}"; - meta = { inherit version; }; - }; -in + rustPlatform.buildRustPackage rec { pname = "deno"; - version = "1.6.3"; + version = "1.8.0"; src = fetchFromGitHub { owner = "denoland"; repo = pname; rev = "v${version}"; - sha256 = "1wmkx458fpsfw57ysawxc0ghxag8v051hiyswm7nnb7gckrm6j8z"; - fetchSubmodules = true; + sha256 = "sha256-26VTwc99XunkTqsdP4b7axjflLL93PGkgjGtMmI4/4A="; }; - cargoSha256 = "08vzsp53019gmxkn8lpa6l84w3fvbrnr11lzrfgf99nmii6l2hq5"; + cargoSha256 = "sha256-T/xu/uokDvf9nBXNL31oXl+L5KifSs+bF4J7Tfw37zs="; # Install completions post-install nativeBuildInputs = [ installShellFiles ]; @@ -36,17 +28,27 @@ rustPlatform.buildRustPackage rec { # The rusty_v8 package will try to download a `librusty_v8.a` release at build time to our read-only filesystem # To avoid this we pre-download the file and place it in the locations it will require it in advance - preBuild = '' - _rusty_v8_setup() { - for v in "$@"; do - dir="target/$v/gn_out/obj" - mkdir -p "$dir" && cp "${rustyV8Lib}" "$dir/librusty_v8.a" - done - } + preBuild = + let + inherit (import ./deps.nix { }) librusty_v8; + arch = rust.toRustTarget stdenv.hostPlatform; + librusty_v8_release = fetchurl { + url = "https://github.com/denoland/rusty_v8/releases/download/v${librusty_v8.version}/librusty_v8_release_${arch}.a"; + sha256 = librusty_v8.sha256s.${stdenv.hostPlatform.system}; + meta = { inherit (librusty_v8) version; }; + }; + in + '' + _rusty_v8_setup() { + for v in "$@"; do + dir="target/$v/gn_out/obj" + mkdir -p "$dir" && cp "${librusty_v8_release}" "$dir/librusty_v8.a" + done + } - # Copy over the `librusty_v8.a` file inside target/XYZ/gn_out/obj, symlink not allowed - _rusty_v8_setup "debug" "release" "${arch}/release" - ''; + # Copy over the `librusty_v8.a` file inside target/XYZ/gn_out/obj, symlink not allowed + _rusty_v8_setup "debug" "release" "${arch}/release" + ''; # Tests have some inconsistencies between runs with output integration tests # Skipping until resolved @@ -54,7 +56,7 @@ rustPlatform.buildRustPackage rec { postInstall = '' # remove test plugin and test server - rm -rf $out/lib $out/bin/test_server + rm -r $out/lib $out/bin/test_server $out/bin/denort installShellCompletion --cmd deno \ --bash <($out/bin/deno completions bash) \ @@ -62,11 +64,19 @@ rustPlatform.buildRustPackage rec { --zsh <($out/bin/deno completions zsh) ''; + doInstallCheck = true; + installCheckPhase = '' + runHook preInstallCheck + $out/bin/deno --help + $out/bin/deno --version | grep "deno ${version}" + runHook postInstallCheck + ''; + passthru.updateScript = ./update/update.ts; meta = with lib; { homepage = "https://deno.land/"; - changelog = "${src.meta.homepage}/releases/tag/v${version}"; + changelog = "https://github.com/denoland/deno/releases/tag/v${version}"; description = "A secure runtime for JavaScript and TypeScript"; longDescription = '' Deno aims to be a productive and secure scripting environment for the modern programmer. @@ -79,6 +89,6 @@ rustPlatform.buildRustPackage rec { ''; license = licenses.mit; maintainers = with maintainers; [ jk ]; - platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ]; + platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; }; } diff --git a/pkgs/development/web/deno/deps.nix b/pkgs/development/web/deno/deps.nix index 4426c600df75..3f5846f2a96b 100644 --- a/pkgs/development/web/deno/deps.nix +++ b/pkgs/development/web/deno/deps.nix @@ -1,12 +1,13 @@ # auto-generated file -- DO NOT EDIT! {}: rec { - rustyV8Lib = { - version = "0.15.0"; + librusty_v8 = { + version = "0.20.0"; sha256s = { - x86_64-linux = "1j789pvqh44vsffzl5wg3pp3awrlixjrhbnjx2klsml7jv0lp0mq"; - aarch64-linux = "13srja4vc275ygm806hcsr8mxjnd9qkzaqs58lxnp0702qs5xls6"; - x86_64-darwin = "0aij9yb5i1r3pz0pyl51qdbgfspfdngwbk1qgkp4gxzl3cbnysx1"; + x86_64-linux = "1y0av2hghdvk2qv8kgw29x833wy31i89z7z6hw4jd1y21ihqsdd5"; + aarch64-linux = "0726ay48w74y79j892is8qxx0kg3m35lmbniwcgy37idxm06vx28"; + x86_64-darwin = "0gmfdmd5dvxh5xyxsq3nk8fpvdmpczq7nmj1b2zsakl8v3j14jck"; + aarch64-darwin = "1zw3pxp13s38wspv5lwcns02wzrqagay9zjxj2wiygfzzr5b2c88"; }; }; } diff --git a/pkgs/development/web/deno/update/deps.ts b/pkgs/development/web/deno/update/deps.ts index beedeade3a86..f4266e1c90fc 100644 --- a/pkgs/development/web/deno/update/deps.ts +++ b/pkgs/development/web/deno/update/deps.ts @@ -45,7 +45,7 @@ const templateDeps = (version: string, deps: PrefetchResult[]) => `# auto-generated file -- DO NOT EDIT! {}: rec { - rustyV8Lib = { + librusty_v8 = { version = "${version}"; sha256s = { ${deps.map((d) => ` ${d.arch.nix} = "${d.sha256}";`).join("\n")} @@ -65,9 +65,9 @@ export async function updateDeps( // 0.0.0 const version = await getRustyV8Version(owner, repo, denoVersion); if (typeof version !== "string") { - throw "no rusty_v8 version"; + throw "no librusty_v8 version"; } - log("rusty_v8 version:", version); + log("librusty_v8 version:", version); const existingVersion = await getExistingVersion(filePath); if (version === existingVersion) { log("Version already matches latest, skipping..."); diff --git a/pkgs/development/web/deno/update/update.ts b/pkgs/development/web/deno/update/update.ts index 18d451480137..232c2482b1c1 100755 --- a/pkgs/development/web/deno/update/update.ts +++ b/pkgs/development/web/deno/update/update.ts @@ -24,6 +24,7 @@ const architectures: Architecture[] = [ { nix: "x86_64-linux", rust: "x86_64-unknown-linux-gnu" }, { nix: "aarch64-linux", rust: "aarch64-unknown-linux-gnu" }, { nix: "x86_64-darwin", rust: "x86_64-apple-darwin" }, + { nix: "aarch64-darwin", rust: "aarch64-apple-darwin" }, ]; log("Updating deno"); From 9611f03177670fad02df91c83f38f53dab31df28 Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Fri, 12 Mar 2021 11:25:34 +0000 Subject: [PATCH 2/5] deno: make it easier to override librusty_v8 --- pkgs/development/web/deno/default.nix | 19 ++++++------------- pkgs/development/web/deno/deps.nix | 13 ------------- pkgs/development/web/deno/librusty_v8.nix | 21 +++++++++++++++++++++ 3 files changed, 27 insertions(+), 26 deletions(-) delete mode 100644 pkgs/development/web/deno/deps.nix create mode 100644 pkgs/development/web/deno/librusty_v8.nix diff --git a/pkgs/development/web/deno/default.nix b/pkgs/development/web/deno/default.nix index 18fd53bd94b7..9951ead02b3a 100644 --- a/pkgs/development/web/deno/default.nix +++ b/pkgs/development/web/deno/default.nix @@ -1,5 +1,6 @@ { stdenv , lib +, callPackage , fetchurl , fetchFromGitHub , rust @@ -7,6 +8,7 @@ , installShellFiles , Security , CoreServices +, librusty_v8 ? callPackage ./librusty_v8.nix { } }: rustPlatform.buildRustPackage rec { @@ -29,25 +31,16 @@ rustPlatform.buildRustPackage rec { # The rusty_v8 package will try to download a `librusty_v8.a` release at build time to our read-only filesystem # To avoid this we pre-download the file and place it in the locations it will require it in advance preBuild = - let - inherit (import ./deps.nix { }) librusty_v8; - arch = rust.toRustTarget stdenv.hostPlatform; - librusty_v8_release = fetchurl { - url = "https://github.com/denoland/rusty_v8/releases/download/v${librusty_v8.version}/librusty_v8_release_${arch}.a"; - sha256 = librusty_v8.sha256s.${stdenv.hostPlatform.system}; - meta = { inherit (librusty_v8) version; }; - }; - in + let arch = rust.toRustTarget stdenv.hostPlatform; in '' - _rusty_v8_setup() { + _librusty_v8_setup() { for v in "$@"; do - dir="target/$v/gn_out/obj" - mkdir -p "$dir" && cp "${librusty_v8_release}" "$dir/librusty_v8.a" + install -D ${librusty_v8} "target/$v/gn_out/obj/librusty_v8.a" done } # Copy over the `librusty_v8.a` file inside target/XYZ/gn_out/obj, symlink not allowed - _rusty_v8_setup "debug" "release" "${arch}/release" + _librusty_v8_setup "debug" "release" "${arch}/release" ''; # Tests have some inconsistencies between runs with output integration tests diff --git a/pkgs/development/web/deno/deps.nix b/pkgs/development/web/deno/deps.nix deleted file mode 100644 index 3f5846f2a96b..000000000000 --- a/pkgs/development/web/deno/deps.nix +++ /dev/null @@ -1,13 +0,0 @@ -# auto-generated file -- DO NOT EDIT! -{}: -rec { - librusty_v8 = { - version = "0.20.0"; - sha256s = { - x86_64-linux = "1y0av2hghdvk2qv8kgw29x833wy31i89z7z6hw4jd1y21ihqsdd5"; - aarch64-linux = "0726ay48w74y79j892is8qxx0kg3m35lmbniwcgy37idxm06vx28"; - x86_64-darwin = "0gmfdmd5dvxh5xyxsq3nk8fpvdmpczq7nmj1b2zsakl8v3j14jck"; - aarch64-darwin = "1zw3pxp13s38wspv5lwcns02wzrqagay9zjxj2wiygfzzr5b2c88"; - }; - }; -} diff --git a/pkgs/development/web/deno/librusty_v8.nix b/pkgs/development/web/deno/librusty_v8.nix new file mode 100644 index 000000000000..31dbce08922f --- /dev/null +++ b/pkgs/development/web/deno/librusty_v8.nix @@ -0,0 +1,21 @@ +# auto-generated file -- DO NOT EDIT! +{ rust, stdenv, fetchurl }: + +let + arch = rust.toRustTarget stdenv.hostPlatform; + fetch_librusty_v8 = args: fetchurl { + name = "librusty_v8-${args.version}"; + url = "https://github.com/denoland/rusty_v8/releases/download/v${args.version}/librusty_v8_release_${arch}.a"; + sha256 = args.shas.${stdenv.hostPlatform.system}; + meta = { inherit (args) version; }; + }; +in +fetch_librusty_v8 { + version = "0.20.0"; + shas = { + x86_64-linux = "sha256-pTWNYQzChyYJh+afn1AMw/MxUE+Cv4k2FnM3+KDYCvg="; + aarch64-linux = "sha256-SPRtQO0tnuEf49GuSsuo403QO0Y6ioRkOp4cjohXRhw="; + x86_64-darwin = "sha256-k0kS5NiITqW/WEFWe/Bnt7Z9HZp2YN19L7DvVlptrj4="; + aarch64-darwin = "sha256-CDGxSv7fPR+5kF3+5NVTOH8ugLaM07Kv5mjoEW6/g/8="; + }; +} From c034a1412b180950af7de2ef004bdaa09d93516f Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Fri, 12 Mar 2021 19:14:19 +0000 Subject: [PATCH 3/5] deno: update update script to changed deno --- pkgs/development/web/deno/update/common.ts | 34 +++---- pkgs/development/web/deno/update/deps.ts | 79 ---------------- .../web/deno/update/librusty_v8.ts | 92 +++++++++++++++++++ pkgs/development/web/deno/update/src.ts | 10 +- pkgs/development/web/deno/update/update.ts | 16 +--- 5 files changed, 113 insertions(+), 118 deletions(-) delete mode 100644 pkgs/development/web/deno/update/deps.ts create mode 100644 pkgs/development/web/deno/update/librusty_v8.ts diff --git a/pkgs/development/web/deno/update/common.ts b/pkgs/development/web/deno/update/common.ts index d8956b21d163..1b4e3509ea7c 100644 --- a/pkgs/development/web/deno/update/common.ts +++ b/pkgs/development/web/deno/update/common.ts @@ -3,12 +3,15 @@ interface GHRelease { } const decode = (buffer: Uint8Array) => new TextDecoder("utf-8").decode(buffer); -const run = async (command: string, args: string[]) => { - const cmd = Deno.run( - { cmd: [command, ...args], stdout: "piped", stderr: "piped" }, - ); +const decodeTrim = (b: Uint8Array) => decode(b).trimEnd(); +export const run = async (command: string, args: string[]) => { + const cmd = Deno.run({ + cmd: [command, ...args], + stdout: "piped", + stderr: "piped", + }); if (!(await cmd.status()).success) { - const error = await cmd.stderrOutput().then((b) => decode(b).trimEnd()); + const error = await cmd.stderrOutput().then(decodeTrim); // Known error we can ignore if (error.includes("'allow-unsafe-native-code-during-evaluation'")) { // Extract the target sha256 out of the error @@ -23,26 +26,16 @@ const run = async (command: string, args: string[]) => { } throw new Error(error); } - return cmd.output().then((b) => decode(b).trimEnd()); + return cmd.output().then(decodeTrim); }; // Exports export const versionRegExp = /\d+\.\d+\.\d+/; -export const sha256RegExp = /[a-z0-9]{52}/; - -export async function commit( - name: string, - oldVer: string, - newVer: string, - files: string[], -) { - await run("git", ["add", ...files]); - await run("git", ["commit", "-m", `${name}: ${oldVer} -> ${newVer}`]); -} +export const sha256RegExp = /[a-z0-9]{52}|sha256-.{44}/; export const getExistingVersion = async (filePath: string) => - read(filePath).then((s) => - s.match(genValueRegExp("version", versionRegExp))?.shift() || "" + read(filePath).then( + (s) => s.match(genValueRegExp("version", versionRegExp))?.shift() || "", ); export const getLatestVersion = (owner: string, repo: string) => @@ -58,8 +51,5 @@ export const genValueRegExp = (key: string, regex: RegExp) => export const logger = (name: string) => (...a: any) => console.log(`[${name}]`, ...a); -export const nixPrefetch = (args: string[]) => run("nix-prefetch", args); -export const nixPrefetchURL = (args: string[]) => run("nix-prefetch-url", args); - export const read = Deno.readTextFile; export const write = Deno.writeTextFile; diff --git a/pkgs/development/web/deno/update/deps.ts b/pkgs/development/web/deno/update/deps.ts deleted file mode 100644 index f4266e1c90fc..000000000000 --- a/pkgs/development/web/deno/update/deps.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { - getExistingVersion, - genValueRegExp, - logger, - nixPrefetchURL, - versionRegExp, - write, -} from "./common.ts"; - -const log = logger("deps"); - -export interface Architecture { - nix: string; - rust: string; -} -interface PrefetchResult { - arch: Architecture; - sha256: string; -} - -const getRustyV8Version = async ( - owner: string, - repo: string, - version: string, -) => - fetch( - `https://github.com/${owner}/${repo}/raw/${version}/core/Cargo.toml`, - ) - .then((res) => res.text()) - .then((txt) => - txt.match(genValueRegExp("rusty_v8", versionRegExp))?.shift() - ); - -const archShaTasks = (version: string, arches: Architecture[]) => - arches.map(async (arch: Architecture): Promise => { - log("Fetching:", arch.nix); - const sha256 = await nixPrefetchURL( - [`https://github.com/denoland/rusty_v8/releases/download/v${version}/librusty_v8_release_${arch.rust}.a`], - ); - log("Done: ", arch.nix); - return { arch, sha256 }; - }); - -const templateDeps = (version: string, deps: PrefetchResult[]) => - `# auto-generated file -- DO NOT EDIT! -{}: -rec { - librusty_v8 = { - version = "${version}"; - sha256s = { -${deps.map((d) => ` ${d.arch.nix} = "${d.sha256}";`).join("\n")} - }; - }; -} -`; - -export async function updateDeps( - filePath: string, - owner: string, - repo: string, - denoVersion: string, - arches: Architecture[], -) { - log("Starting deps update"); - // 0.0.0 - const version = await getRustyV8Version(owner, repo, denoVersion); - if (typeof version !== "string") { - throw "no librusty_v8 version"; - } - log("librusty_v8 version:", version); - const existingVersion = await getExistingVersion(filePath); - if (version === existingVersion) { - log("Version already matches latest, skipping..."); - return; - } - const archShaResults = await Promise.all(archShaTasks(version, arches)); - await write(filePath, templateDeps(version, archShaResults)); - log("Finished deps update"); -} diff --git a/pkgs/development/web/deno/update/librusty_v8.ts b/pkgs/development/web/deno/update/librusty_v8.ts new file mode 100644 index 000000000000..dee3277c5812 --- /dev/null +++ b/pkgs/development/web/deno/update/librusty_v8.ts @@ -0,0 +1,92 @@ +import { + genValueRegExp, + getExistingVersion, + logger, + run, + versionRegExp, + write, +} from "./common.ts"; + +const log = logger("librusty_v8"); + +export interface Architecture { + nix: string; + rust: string; +} +interface PrefetchResult { + arch: Architecture; + sha256: string; +} + +const getLibrustyV8Version = async ( + owner: string, + repo: string, + version: string, +) => + fetch(`https://github.com/${owner}/${repo}/raw/${version}/core/Cargo.toml`) + .then((res) => res.text()) + .then((txt) => + txt.match(genValueRegExp("rusty_v8", versionRegExp))?.shift() + ); + +const fetchArchShaTasks = (version: string, arches: Architecture[]) => + arches.map( + async (arch: Architecture): Promise => { + log("Fetching:", arch.nix); + const sha256 = await run("nix-prefetch", [ + ` +{ fetchurl }: +fetchurl { + url = "https://github.com/denoland/rusty_v8/releases/download/v${version}/librusty_v8_release_${arch.rust}.a"; +} +`, + ]); + log("Done: ", arch.nix); + return { arch, sha256 }; + }, + ); + +const templateDeps = (version: string, deps: PrefetchResult[]) => + `# auto-generated file -- DO NOT EDIT! +{ rust, stdenv, fetchurl }: + +let + arch = rust.toRustTarget stdenv.hostPlatform; + fetch_librusty_v8 = args: fetchurl { + name = "librusty_v8-\${args.version}"; + url = "https://github.com/denoland/rusty_v8/releases/download/v\${args.version}/librusty_v8_release_\${arch}.a"; + sha256 = args.shas.\${stdenv.hostPlatform.system}; + meta = { inherit (args) version; }; + }; +in +fetch_librusty_v8 { + version = "${version}"; + shas = { +${deps.map(({ arch, sha256 }) => ` ${arch.nix} = "${sha256}";`).join("\n")} + }; +} +`; + +export async function updateLibrustyV8( + filePath: string, + owner: string, + repo: string, + denoVersion: string, + arches: Architecture[], +) { + log("Starting librusty_v8 update"); + // 0.0.0 + const version = await getLibrustyV8Version(owner, repo, denoVersion); + if (typeof version !== "string") { + throw "no librusty_v8 version"; + } + log("librusty_v8 version:", version); + const existingVersion = await getExistingVersion(filePath); + if (version === existingVersion) { + log("Version already matches latest, skipping..."); + return; + } + const archShaResults = await Promise.all(fetchArchShaTasks(version, arches)); + await write(filePath, templateDeps(version, archShaResults)); + log("Finished deps update"); +} diff --git a/pkgs/development/web/deno/update/src.ts b/pkgs/development/web/deno/update/src.ts index fae15acd0d2c..3bfae27c21c3 100644 --- a/pkgs/development/web/deno/update/src.ts +++ b/pkgs/development/web/deno/update/src.ts @@ -1,8 +1,8 @@ import { genValueRegExp, logger, - nixPrefetch, read, + run, sha256RegExp, versionRegExp, write, @@ -16,10 +16,11 @@ interface Replacer { const log = logger("src"); const prefetchSha256 = (nixpkgs: string, version: string) => - nixPrefetch(["-f", nixpkgs, "deno.src", "--rev", version]); + run("nix-prefetch", ["-f", nixpkgs, "deno.src", "--rev", version]); const prefetchCargoSha256 = (nixpkgs: string) => - nixPrefetch( - [`{ sha256 }: (import ${nixpkgs} {}).deno.cargoDeps.overrideAttrs (_: { outputHash = sha256; })`], + run( + "nix-prefetch", + [`{ sha256 }: (import ${nixpkgs} {}).deno.cargoDeps.overrideAttrs (_: { inherit sha256; })`], ); const replace = (str: string, replacers: Replacer[]) => @@ -53,7 +54,6 @@ export async function updateSrc( [ genVerReplacer("version", trimVersion), genShaReplacer("sha256", sha256), - genShaReplacer("cargoSha256", ""), // Empty ready for prefetchCargoSha256 ], ); log("Fetching cargoSha256 for:", sha256); diff --git a/pkgs/development/web/deno/update/update.ts b/pkgs/development/web/deno/update/update.ts index 232c2482b1c1..27e1d86ee861 100755 --- a/pkgs/development/web/deno/update/update.ts +++ b/pkgs/development/web/deno/update/update.ts @@ -2,13 +2,8 @@ /* #!nix-shell -i "deno run --allow-net --allow-run --allow-read --allow-write" -p deno git nix-prefetch */ -import { - commit, - getExistingVersion, - getLatestVersion, - logger, -} from "./common.ts"; -import { Architecture, updateDeps } from "./deps.ts"; +import { getExistingVersion, getLatestVersion, logger } from "./common.ts"; +import { Architecture, updateLibrustyV8 } from "./librusty_v8.ts"; import { updateSrc } from "./src.ts"; const log = logger("update"); @@ -19,7 +14,7 @@ const owner = "denoland"; const repo = "deno"; const denoDir = `${nixpkgs}/pkgs/development/web/${repo}`; const src = `${denoDir}/default.nix`; -const deps = `${denoDir}/deps.nix`; +const librusty_v8 = `${denoDir}/librusty_v8.nix`; const architectures: Architecture[] = [ { nix: "x86_64-linux", rust: "x86_64-unknown-linux-gnu" }, { nix: "aarch64-linux", rust: "aarch64-unknown-linux-gnu" }, @@ -42,10 +37,7 @@ if (trimVersion === existingVersion) { const tasks = [ updateSrc(src, nixpkgs, version), - updateDeps(deps, owner, repo, version, architectures), + updateLibrustyV8(librusty_v8, owner, repo, version, architectures), ]; await Promise.all(tasks); log("Updating deno complete"); -log("Commiting"); -await commit(repo, existingVersion, trimVersion, [src, deps]); -log("Done"); From d45cf406a4dde9041f55768d5c8fa80c885bac63 Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Sat, 13 Mar 2021 11:08:06 +0000 Subject: [PATCH 4/5] deno: 1.8.0 -> 1.8.1 --- pkgs/development/web/deno/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/web/deno/default.nix b/pkgs/development/web/deno/default.nix index 9951ead02b3a..a77a4e385d4e 100644 --- a/pkgs/development/web/deno/default.nix +++ b/pkgs/development/web/deno/default.nix @@ -13,15 +13,15 @@ rustPlatform.buildRustPackage rec { pname = "deno"; - version = "1.8.0"; + version = "1.8.1"; src = fetchFromGitHub { owner = "denoland"; repo = pname; rev = "v${version}"; - sha256 = "sha256-26VTwc99XunkTqsdP4b7axjflLL93PGkgjGtMmI4/4A="; + sha256 = "sha256-tyqZ/vjQ9gjLoK+Juj30It3H6+2sT9Fj/s0kEv0HRwI="; }; - cargoSha256 = "sha256-T/xu/uokDvf9nBXNL31oXl+L5KifSs+bF4J7Tfw37zs="; + cargoSha256 = "sha256-LpBQztMqw7IbgTJkfiD+6Fcy5XXmN58HO/zhVen3oCI="; # Install completions post-install nativeBuildInputs = [ installShellFiles ]; From 58bcc97dc24340041d0144ecd0457e9f80c05869 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 14 Mar 2021 04:20:00 +0000 Subject: [PATCH 5/5] deno: fix build on darwin --- pkgs/development/web/deno/default.nix | 6 ++++-- pkgs/top-level/all-packages.nix | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/web/deno/default.nix b/pkgs/development/web/deno/default.nix index a77a4e385d4e..17a3ae58f2a7 100644 --- a/pkgs/development/web/deno/default.nix +++ b/pkgs/development/web/deno/default.nix @@ -1,13 +1,15 @@ { stdenv , lib , callPackage -, fetchurl , fetchFromGitHub , rust , rustPlatform , installShellFiles +, libobjc , Security , CoreServices +, Metal +, Foundation , librusty_v8 ? callPackage ./librusty_v8.nix { } }: @@ -26,7 +28,7 @@ rustPlatform.buildRustPackage rec { # Install completions post-install nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ Security CoreServices ]; + buildInputs = lib.optionals stdenv.isDarwin [ libobjc Security CoreServices Metal Foundation ]; # The rusty_v8 package will try to download a `librusty_v8.a` release at build time to our read-only filesystem # To avoid this we pre-download the file and place it in the locations it will require it in advance diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1a6d2052d347..4726ccba81ac 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3607,7 +3607,8 @@ in }; deno = callPackage ../development/web/deno { - inherit (darwin.apple_sdk.frameworks) Security CoreServices; + inherit (darwin) libobjc; + inherit (darwin.apple_sdk.frameworks) Security CoreServices Metal Foundation; }; detox = callPackage ../tools/misc/detox { };