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

+47 -35
+37 -27
pkgs/development/web/deno/default.nix
··· 1 - { lib, stdenv 1 + { stdenv 2 + , lib 2 3 , fetchurl 3 4 , fetchFromGitHub 4 5 , rust ··· 7 8 , Security 8 9 , CoreServices 9 10 }: 10 - let 11 - deps = import ./deps.nix { }; 12 - arch = rust.toRustTarget stdenv.hostPlatform; 13 - rustyV8Lib = with deps.rustyV8Lib; fetchurl { 14 - url = "https://github.com/denoland/rusty_v8/releases/download/v${version}/librusty_v8_release_${arch}.a"; 15 - sha256 = sha256s."${stdenv.hostPlatform.system}"; 16 - meta = { inherit version; }; 17 - }; 18 - in 11 + 19 12 rustPlatform.buildRustPackage rec { 20 13 pname = "deno"; 21 - version = "1.6.3"; 14 + version = "1.8.0"; 22 15 23 16 src = fetchFromGitHub { 24 17 owner = "denoland"; 25 18 repo = pname; 26 19 rev = "v${version}"; 27 - sha256 = "1wmkx458fpsfw57ysawxc0ghxag8v051hiyswm7nnb7gckrm6j8z"; 28 - fetchSubmodules = true; 20 + sha256 = "sha256-26VTwc99XunkTqsdP4b7axjflLL93PGkgjGtMmI4/4A="; 29 21 }; 30 - cargoSha256 = "08vzsp53019gmxkn8lpa6l84w3fvbrnr11lzrfgf99nmii6l2hq5"; 22 + cargoSha256 = "sha256-T/xu/uokDvf9nBXNL31oXl+L5KifSs+bF4J7Tfw37zs="; 31 23 32 24 # Install completions post-install 33 25 nativeBuildInputs = [ installShellFiles ]; ··· 36 28 37 29 # The rusty_v8 package will try to download a `librusty_v8.a` release at build time to our read-only filesystem 38 30 # To avoid this we pre-download the file and place it in the locations it will require it in advance 39 - preBuild = '' 40 - _rusty_v8_setup() { 41 - for v in "$@"; do 42 - dir="target/$v/gn_out/obj" 43 - mkdir -p "$dir" && cp "${rustyV8Lib}" "$dir/librusty_v8.a" 44 - done 45 - } 31 + preBuild = 32 + let 33 + inherit (import ./deps.nix { }) librusty_v8; 34 + arch = rust.toRustTarget stdenv.hostPlatform; 35 + librusty_v8_release = fetchurl { 36 + url = "https://github.com/denoland/rusty_v8/releases/download/v${librusty_v8.version}/librusty_v8_release_${arch}.a"; 37 + sha256 = librusty_v8.sha256s.${stdenv.hostPlatform.system}; 38 + meta = { inherit (librusty_v8) version; }; 39 + }; 40 + in 41 + '' 42 + _rusty_v8_setup() { 43 + for v in "$@"; do 44 + dir="target/$v/gn_out/obj" 45 + mkdir -p "$dir" && cp "${librusty_v8_release}" "$dir/librusty_v8.a" 46 + done 47 + } 46 48 47 - # Copy over the `librusty_v8.a` file inside target/XYZ/gn_out/obj, symlink not allowed 48 - _rusty_v8_setup "debug" "release" "${arch}/release" 49 - ''; 49 + # Copy over the `librusty_v8.a` file inside target/XYZ/gn_out/obj, symlink not allowed 50 + _rusty_v8_setup "debug" "release" "${arch}/release" 51 + ''; 50 52 51 53 # Tests have some inconsistencies between runs with output integration tests 52 54 # Skipping until resolved ··· 54 56 55 57 postInstall = '' 56 58 # remove test plugin and test server 57 - rm -rf $out/lib $out/bin/test_server 59 + rm -r $out/lib $out/bin/test_server $out/bin/denort 58 60 59 61 installShellCompletion --cmd deno \ 60 62 --bash <($out/bin/deno completions bash) \ ··· 62 64 --zsh <($out/bin/deno completions zsh) 63 65 ''; 64 66 67 + doInstallCheck = true; 68 + installCheckPhase = '' 69 + runHook preInstallCheck 70 + $out/bin/deno --help 71 + $out/bin/deno --version | grep "deno ${version}" 72 + runHook postInstallCheck 73 + ''; 74 + 65 75 passthru.updateScript = ./update/update.ts; 66 76 67 77 meta = with lib; { 68 78 homepage = "https://deno.land/"; 69 - changelog = "${src.meta.homepage}/releases/tag/v${version}"; 79 + changelog = "https://github.com/denoland/deno/releases/tag/v${version}"; 70 80 description = "A secure runtime for JavaScript and TypeScript"; 71 81 longDescription = '' 72 82 Deno aims to be a productive and secure scripting environment for the modern programmer. ··· 79 89 ''; 80 90 license = licenses.mit; 81 91 maintainers = with maintainers; [ jk ]; 82 - platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ]; 92 + platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; 83 93 }; 84 94 }
+6 -5
pkgs/development/web/deno/deps.nix
··· 1 1 # auto-generated file -- DO NOT EDIT! 2 2 {}: 3 3 rec { 4 - rustyV8Lib = { 5 - version = "0.15.0"; 4 + librusty_v8 = { 5 + version = "0.20.0"; 6 6 sha256s = { 7 - x86_64-linux = "1j789pvqh44vsffzl5wg3pp3awrlixjrhbnjx2klsml7jv0lp0mq"; 8 - aarch64-linux = "13srja4vc275ygm806hcsr8mxjnd9qkzaqs58lxnp0702qs5xls6"; 9 - x86_64-darwin = "0aij9yb5i1r3pz0pyl51qdbgfspfdngwbk1qgkp4gxzl3cbnysx1"; 7 + x86_64-linux = "1y0av2hghdvk2qv8kgw29x833wy31i89z7z6hw4jd1y21ihqsdd5"; 8 + aarch64-linux = "0726ay48w74y79j892is8qxx0kg3m35lmbniwcgy37idxm06vx28"; 9 + x86_64-darwin = "0gmfdmd5dvxh5xyxsq3nk8fpvdmpczq7nmj1b2zsakl8v3j14jck"; 10 + aarch64-darwin = "1zw3pxp13s38wspv5lwcns02wzrqagay9zjxj2wiygfzzr5b2c88"; 10 11 }; 11 12 }; 12 13 }
+3 -3
pkgs/development/web/deno/update/deps.ts
··· 45 45 `# auto-generated file -- DO NOT EDIT! 46 46 {}: 47 47 rec { 48 - rustyV8Lib = { 48 + librusty_v8 = { 49 49 version = "${version}"; 50 50 sha256s = { 51 51 ${deps.map((d) => ` ${d.arch.nix} = "${d.sha256}";`).join("\n")} ··· 65 65 // 0.0.0 66 66 const version = await getRustyV8Version(owner, repo, denoVersion); 67 67 if (typeof version !== "string") { 68 - throw "no rusty_v8 version"; 68 + throw "no librusty_v8 version"; 69 69 } 70 - log("rusty_v8 version:", version); 70 + log("librusty_v8 version:", version); 71 71 const existingVersion = await getExistingVersion(filePath); 72 72 if (version === existingVersion) { 73 73 log("Version already matches latest, skipping...");
+1
pkgs/development/web/deno/update/update.ts
··· 24 24 { nix: "x86_64-linux", rust: "x86_64-unknown-linux-gnu" }, 25 25 { nix: "aarch64-linux", rust: "aarch64-unknown-linux-gnu" }, 26 26 { nix: "x86_64-darwin", rust: "x86_64-apple-darwin" }, 27 + { nix: "aarch64-darwin", rust: "aarch64-apple-darwin" }, 27 28 ]; 28 29 29 30 log("Updating deno");