From c5ab781203b224d53f1c4d2ea12b24cd8cf1e05f Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Thu, 18 Nov 2021 21:24:59 +0200 Subject: [PATCH 1/2] deno: 1.15.3 -> 1.16.2 Also update crate name to look for in Cargo.toml - rusty_v8 has been renamed to v8 --- pkgs/development/web/deno/default.nix | 23 +++++-------------- pkgs/development/web/deno/librusty_v8.nix | 10 ++++---- .../web/deno/update/librusty_v8.ts | 2 +- 3 files changed, 12 insertions(+), 23 deletions(-) diff --git a/pkgs/development/web/deno/default.nix b/pkgs/development/web/deno/default.nix index 126226205d6a..d27dac79b7b3 100644 --- a/pkgs/development/web/deno/default.nix +++ b/pkgs/development/web/deno/default.nix @@ -17,15 +17,15 @@ rustPlatform.buildRustPackage rec { pname = "deno"; - version = "1.15.3"; + version = "1.16.2"; src = fetchFromGitHub { owner = "denoland"; repo = pname; rev = "v${version}"; - sha256 = "sha256-IFEo2F3gayR2LmAAJXezZPXpRfZf4re3YPZRcXpqx6o="; + sha256 = "sha256-Qf1eDQ6ZbBGOQIDh2q8hKjsKB0Ri9Hjqq1AMOTanML0="; }; - cargoSha256 = "sha256-9ZpPiqlqP01B9ETpVqVreivNuSMB1td4LinxXdH7PsM="; + cargoSha256 = "sha256-ZA9pR8yQV5v/Xa/B7M01PIqrkBe1DVIXC5VURoE1EtI="; # Install completions post-install nativeBuildInputs = [ installShellFiles ]; @@ -35,20 +35,9 @@ rustPlatform.buildRustPackage rec { buildInputs = lib.optionals stdenv.isDarwin [ libiconv libobjc Security CoreServices Metal Foundation QuartzCore ]; - # 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 arch = rust.toRustTarget stdenv.hostPlatform; in - '' - _librusty_v8_setup() { - for v in "$@"; do - 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 - _librusty_v8_setup "debug" "release" "${arch}/release" - ''; + # The 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 export it via RUSTY_V8_ARCHIVE + RUSTY_V8_ARCHIVE = librusty_v8; # Tests have some inconsistencies between runs with output integration tests # Skipping until resolved diff --git a/pkgs/development/web/deno/librusty_v8.nix b/pkgs/development/web/deno/librusty_v8.nix index 6e63681f66bb..7539f41e3afe 100644 --- a/pkgs/development/web/deno/librusty_v8.nix +++ b/pkgs/development/web/deno/librusty_v8.nix @@ -11,11 +11,11 @@ let }; in fetch_librusty_v8 { - version = "0.32.0"; + version = "0.34.0"; shas = { - x86_64-linux = "sha256-35Rm4j4BJNCfl3MQJIpKw1altzm9fgvZ6WeC2cF4Qzc="; - aarch64-linux = "sha256-w1ljFwao/YMO27QSaEyVl7HEVnfzZyVOXZK4xN0205Y="; - x86_64-darwin = "sha256-oNrF9lFkgMgphDElKQRXMq9uYua75e2HrfflNO+CyPk="; - aarch64-darwin = "sha256-Bz9C1AChvGJYamnIg1XtYyTzmIisL0Oe/yDjB7ZebMw="; + x86_64-linux = "sha256-Ly5bEfC993JH3/1VNpFu72Dv8kJYOFu+HIlEUJJcHps="; + aarch64-linux = "sha256-zazlvm4uyHD6Z+2JmeHS7gQ84C83KTWOGqNjSNPgoT0="; + x86_64-darwin = "sha256-RTgbtkCAuIj/ceJNbdA0yfKtFG8hSZgurEHEuUfJ7fk="; + aarch64-darwin = "sha256-xrOUPEZ4tj2BK6pDeoTpTKDx4E1KUEQ+lGMyduKDvBE="; }; } diff --git a/pkgs/development/web/deno/update/librusty_v8.ts b/pkgs/development/web/deno/update/librusty_v8.ts index dee3277c5812..a28f9f36fd40 100644 --- a/pkgs/development/web/deno/update/librusty_v8.ts +++ b/pkgs/development/web/deno/update/librusty_v8.ts @@ -26,7 +26,7 @@ const getLibrustyV8Version = async ( fetch(`https://github.com/${owner}/${repo}/raw/${version}/core/Cargo.toml`) .then((res) => res.text()) .then((txt) => - txt.match(genValueRegExp("rusty_v8", versionRegExp))?.shift() + txt.match(genValueRegExp("v8", versionRegExp))?.shift() ); const fetchArchShaTasks = (version: string, arches: Architecture[]) => From 2ff27bbc8e46c2c602474f76da322c9bef14307c Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Fri, 19 Nov 2021 15:59:59 +0200 Subject: [PATCH 2/2] deno: run deno fmt on update script --- pkgs/development/web/deno/update/librusty_v8.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/development/web/deno/update/librusty_v8.ts b/pkgs/development/web/deno/update/librusty_v8.ts index a28f9f36fd40..91244cd9d6a2 100644 --- a/pkgs/development/web/deno/update/librusty_v8.ts +++ b/pkgs/development/web/deno/update/librusty_v8.ts @@ -25,9 +25,7 @@ const getLibrustyV8Version = async ( ) => fetch(`https://github.com/${owner}/${repo}/raw/${version}/core/Cargo.toml`) .then((res) => res.text()) - .then((txt) => - txt.match(genValueRegExp("v8", versionRegExp))?.shift() - ); + .then((txt) => txt.match(genValueRegExp("v8", versionRegExp))?.shift()); const fetchArchShaTasks = (version: string, arches: Architecture[]) => arches.map(