summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
author06kellyjac <dev@j-k.io>2022-07-13 17:13:17 +0100
committer06kellyjac <dev@j-k.io>2022-07-13 17:13:40 +0100
commit18348a5e4d1e4654f2bc7e6e5c9746ca56c1dd5e (patch)
tree433f58578597f8f420ebe6212f27deb134998168 /pkgs
parente703a434b7210164d8042585509b6e87eb3fadb6 (diff)
deno: 1.23.3 -> 1.23.4
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/web/deno/default.nix40
-rw-r--r--pkgs/development/web/deno/librusty_v8.nix10
-rw-r--r--pkgs/development/web/deno/update/librusty_v8.ts4
3 files changed, 41 insertions, 13 deletions
diff --git a/pkgs/development/web/deno/default.nix b/pkgs/development/web/deno/default.nix
index 6875082864cdf..484f5a3d6b97b 100644
--- a/pkgs/development/web/deno/default.nix
+++ b/pkgs/development/web/deno/default.nix
@@ -4,6 +4,8 @@
 , fetchFromGitHub
 , rustPlatform
 , installShellFiles
+, fetchpatch
+, tinycc
 , libiconv
 , libobjc
 , Security
@@ -14,17 +16,38 @@
 , librusty_v8 ? callPackage ./librusty_v8.nix { }
 }:
 
+let
+  libtcc = tinycc.overrideAttrs (oa: {
+    makeFlags = [ "libtcc.a" ];
+    # tests want tcc binary
+    doCheck = false;
+    outputs = [ "out" ];
+    installPhase = ''
+      mkdir -p $out/lib/
+      mv libtcc.a $out/lib/
+    '';
+  });
+in
 rustPlatform.buildRustPackage rec {
   pname = "deno";
-  version = "1.23.3";
+  version = "1.23.4";
 
   src = fetchFromGitHub {
     owner = "denoland";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-kxQZDuqVddooYeelW3gJBbU7N/PnARj/IG7eBVJoAJ8=";
+    sha256 = "sha256-nLQqfLRuh9mhZfjeiPaGpQbi5bXEg7HiGwrwDmaIRWM=";
   };
-  cargoSha256 = "sha256-bQZpE3kBqN5+lPdHWiiUQsWQwuMkvnfHLy3S1HnS4lk=";
+  cargoSha256 = "sha256-l5Ce/ypYXZKEi859OFskwC/Unpo842ZPxIHvp6lCjQc=";
+
+  patches = [
+    # remove after https://github.com/denoland/deno/pull/15193 is in a release
+    (fetchpatch {
+      name = "byo-tcc.patch";
+      url = "https://github.com/denoland/deno/pull/15193/commits/c43698b2b58af1ef69b1558d55c8ebea0268dfea.patch";
+      sha256 = "sha256-YE5mGHyEm20FjFhr8yveBRlrOVL3+qQYxz2xp/IfmJs=";
+    })
+  ];
 
   postPatch = ''
     # upstream uses lld on aarch64-darwin for faster builds
@@ -32,18 +55,21 @@ rustPlatform.buildRustPackage rec {
     substituteInPlace .cargo/config.toml --replace '"-C", "link-arg=-fuse-ld=lld"' ""
   '';
 
-  # Install completions post-install
   nativeBuildInputs = [ installShellFiles ];
-
-  buildAndTestSubdir = "cli";
-
   buildInputs = lib.optionals stdenv.isDarwin
     [ libiconv libobjc Security CoreServices Metal Foundation QuartzCore ];
 
+  buildAndTestSubdir = "cli";
+
   # 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;
 
+  # The deno_ffi package currently needs libtcc.a on linux and macos and will try to compile it at build time
+  # To avoid this we point it to our copy (dir)
+  # In the future tinycc will be replaced with asm
+  DENO_FFI_LIBTCC = "${libtcc}/lib";
+
   # Tests have some inconsistencies between runs with output integration tests
   # Skipping until resolved
   doCheck = false;
diff --git a/pkgs/development/web/deno/librusty_v8.nix b/pkgs/development/web/deno/librusty_v8.nix
index 0e7cbf510e7e2..1e6626b1e9e1d 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.44.3";
+  version = "0.45.0";
   shas = {
-    x86_64-linux = "sha256-0l05QWfWICFTStB0AVGMAzB28MFOe4kH7Y5mT6CxvGc=";
-    aarch64-linux = "sha256-G2yZPD1lXHZvEX3CwnijoFyWF2dv6fM07+xK0oYKMVU=";
-    x86_64-darwin = "sha256-f0lBrayYNo7ivCqeJcYF5EMEnmrgH+qHLofMzbUJ+Os=";
-    aarch64-darwin = "sha256-3DG8IIMeniYLk+GyK0znFpx/f3URxFy5SFMusEPzykU=";
+    x86_64-linux = "sha256-yZw6zwEhJyRntqOmyk03N+sHxzIrbY/e67AQ21ePlAU=";
+    aarch64-linux = "sha256-2p21Smm5wZycv9u+yDbyerKTjSTB7yau5WC2aJ+Vr8w=";
+    x86_64-darwin = "sha256-HO287V+iBwdqKZUWhZJnuGJO9RE4wGG4cQMN8CkB7WQ=";
+    aarch64-darwin = "sha256-ekoMhWMQpBUdM7R7i82NWrNtQMNqCujNYy1ijOxT64U=";
   };
 }
diff --git a/pkgs/development/web/deno/update/librusty_v8.ts b/pkgs/development/web/deno/update/librusty_v8.ts
index 91244cd9d6a2c..3f2ad8d7b2a3b 100644
--- a/pkgs/development/web/deno/update/librusty_v8.ts
+++ b/pkgs/development/web/deno/update/librusty_v8.ts
@@ -1,3 +1,4 @@
+import * as toml from "https://deno.land/std@0.148.0/encoding/toml.ts";
 import {
   genValueRegExp,
   getExistingVersion,
@@ -7,6 +8,7 @@ import {
   write,
 } from "./common.ts";
 
+
 const log = logger("librusty_v8");
 
 export interface Architecture {
@@ -25,7 +27,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) => mod.parse(txt).dependencies.v8.version);
 
 const fetchArchShaTasks = (version: string, arches: Architecture[]) =>
   arches.map(