about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/web/deno
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/web/deno')
-rw-r--r--nixpkgs/pkgs/development/web/deno/default.nix18
-rw-r--r--nixpkgs/pkgs/development/web/deno/librusty_v8.nix10
-rw-r--r--nixpkgs/pkgs/development/web/deno/update/common.ts4
-rw-r--r--nixpkgs/pkgs/development/web/deno/update/librusty_v8.ts21
4 files changed, 30 insertions, 23 deletions
diff --git a/nixpkgs/pkgs/development/web/deno/default.nix b/nixpkgs/pkgs/development/web/deno/default.nix
index f068c3e8d5f8..9e201961f1d3 100644
--- a/nixpkgs/pkgs/development/web/deno/default.nix
+++ b/nixpkgs/pkgs/development/web/deno/default.nix
@@ -3,6 +3,8 @@
 , callPackage
 , fetchFromGitHub
 , rustPlatform
+, cmake
+, protobuf
 , installShellFiles
 , libiconv
 , darwin
@@ -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
@@ -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 ])
diff --git a/nixpkgs/pkgs/development/web/deno/librusty_v8.nix b/nixpkgs/pkgs/development/web/deno/librusty_v8.nix
index 6e9fc0a669fd..522fe48a3b4f 100644
--- a/nixpkgs/pkgs/development/web/deno/librusty_v8.nix
+++ b/nixpkgs/pkgs/development/web/deno/librusty_v8.nix
@@ -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=";
   };
 }
diff --git a/nixpkgs/pkgs/development/web/deno/update/common.ts b/nixpkgs/pkgs/development/web/deno/update/common.ts
index 1b4e3509ea7c..a31805269cb2 100644
--- a/nixpkgs/pkgs/development/web/deno/update/common.ts
+++ b/nixpkgs/pkgs/development/web/deno/update/common.ts
@@ -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;
diff --git a/nixpkgs/pkgs/development/web/deno/update/librusty_v8.ts b/nixpkgs/pkgs/development/web/deno/update/librusty_v8.ts
index d9d57d2908db..b38e0a28f1ab 100644
--- a/nixpkgs/pkgs/development/web/deno/update/librusty_v8.ts
+++ b/nixpkgs/pkgs/development/web/deno/update/librusty_v8.ts
@@ -1,11 +1,5 @@
-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");
 
@@ -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(
@@ -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";
   }