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