From 9554b6a9008698f16ceb9938419ea542be37136e Mon Sep 17 00:00:00 2001 From: Mynacol Date: Thu, 30 Apr 2026 14:47:00 +0000 Subject: [PATCH 1/6] deno: Remove unused files These files were missed to be deleted during a rebase before 5898d99924c1. --- pkgs/by-name/de/deno/fetchers.nix | 21 ------ pkgs/by-name/de/deno/update/librusty_v8.ts | 74 ---------------------- 2 files changed, 95 deletions(-) delete mode 100644 pkgs/by-name/de/deno/fetchers.nix delete mode 100644 pkgs/by-name/de/deno/update/librusty_v8.ts diff --git a/pkgs/by-name/de/deno/fetchers.nix b/pkgs/by-name/de/deno/fetchers.nix deleted file mode 100644 index cde3418ee764..000000000000 --- a/pkgs/by-name/de/deno/fetchers.nix +++ /dev/null @@ -1,21 +0,0 @@ -# not a stable interface, do not reference outside the deno package but make a -# copy if you need -{ - lib, - stdenv, - fetchurl, -}: - -{ - fetchLibrustyV8 = - args: - fetchurl { - name = "librusty_v8-${args.version}"; - url = "https://github.com/denoland/rusty_v8/releases/download/v${args.version}/librusty_v8_simdutf_release_${stdenv.hostPlatform.rust.rustcTarget}.a.gz"; - sha256 = args.shas.${stdenv.hostPlatform.system}; - meta = { - inherit (args) version; - sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; - }; - }; -} diff --git a/pkgs/by-name/de/deno/update/librusty_v8.ts b/pkgs/by-name/de/deno/update/librusty_v8.ts deleted file mode 100644 index 8c02d1a63d22..000000000000 --- a/pkgs/by-name/de/deno/update/librusty_v8.ts +++ /dev/null @@ -1,74 +0,0 @@ -import * as toml from "jsr:@std/toml@1.0.1"; -import { getExistingVersion, logger, run, write } from "./common.ts"; - -const log = logger("librusty_v8"); - -export interface Architecture { - nix: string; - rust: string; -} -interface PrefetchResult { - arch: Architecture; - sha256: string; -} - -const getCargoLock = async ( - owner: string, - repo: string, - version: string, -) => - fetch(`https://github.com/${owner}/${repo}/raw/${version}/Cargo.lock`) - .then((res) => res.text()) - .then((txt) => toml.parse(txt)); - -const fetchArchShaTasks = (version: string, arches: Architecture[]) => - arches.map( - async (arch: Architecture): Promise => { - log("Fetching:", arch.nix); - const sha256 = await run("nix-prefetch-url", [ - `https://github.com/denoland/rusty_v8/releases/download/v${version}/librusty_v8_simdutf_release_${arch.rust}.a.gz` - ]); - const sha256_sri = await run("nix-hash", ["--type", "sha256", "--to-sri", sha256]); - log("Done: ", arch.nix); - return { arch, sha256: sha256_sri }; - }, - ); - -const templateDeps = (version: string, deps: PrefetchResult[]) => - `# auto-generated file -- DO NOT EDIT! -{ fetchLibrustyV8 }: - -fetchLibrustyV8 { - version = "${version}"; - shas = { -${deps.map(({ arch, sha256 }) => ` ${arch.nix} = "${sha256}";`).join("\n")} - }; -} -`; - -export async function updateLibrustyV8( - filePath: string, - owner: string, - repo: string, - denoVersion: string, - arches: Architecture[], -) { - log("Starting librusty_v8 update"); - // 0.0.0 - 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"; - } - log("librusty_v8 version:", version); - const existingVersion = await getExistingVersion(filePath); - if (version === existingVersion) { - log("Version already matches latest, skipping..."); - return; - } - const archShaResults = await Promise.all(fetchArchShaTasks(version, arches)); - await write(filePath, templateDeps(version, archShaResults)); - log("Finished deps update"); -} From 5355f91652d6dd116d13e0b0d7c1b44f02ca3be0 Mon Sep 17 00:00:00 2001 From: Mynacol Date: Thu, 30 Apr 2026 14:56:00 +0000 Subject: [PATCH 2/6] deno: Move rusty-v8 code to subfolder --- pkgs/by-name/de/deno/package.nix | 2 +- pkgs/by-name/de/deno/{librusty_v8.nix => rusty-v8/default.nix} | 0 ...usty_v8-darwin-fix-__rust_no_alloc_shim_is_unstable_v2.patch | 0 .../de/deno/{ => rusty-v8}/librusty_v8_no_downloads.patch | 0 .../{ => rusty-v8}/librusty_v8_revert_-fno-lifetime-dse.patch | 0 5 files changed, 1 insertion(+), 1 deletion(-) rename pkgs/by-name/de/deno/{librusty_v8.nix => rusty-v8/default.nix} (100%) rename pkgs/by-name/de/deno/{ => rusty-v8}/librusty_v8-darwin-fix-__rust_no_alloc_shim_is_unstable_v2.patch (100%) rename pkgs/by-name/de/deno/{ => rusty-v8}/librusty_v8_no_downloads.patch (100%) rename pkgs/by-name/de/deno/{ => rusty-v8}/librusty_v8_revert_-fno-lifetime-dse.patch (100%) diff --git a/pkgs/by-name/de/deno/package.nix b/pkgs/by-name/de/deno/package.nix index 87c9bd465cd0..494a0111b55b 100644 --- a/pkgs/by-name/de/deno/package.nix +++ b/pkgs/by-name/de/deno/package.nix @@ -9,7 +9,7 @@ protobuf, installShellFiles, makeBinaryWrapper, - librusty_v8 ? callPackage ./librusty_v8.nix { }, + librusty_v8 ? callPackage ./rusty-v8 { }, libffi, sqlite, lld, diff --git a/pkgs/by-name/de/deno/librusty_v8.nix b/pkgs/by-name/de/deno/rusty-v8/default.nix similarity index 100% rename from pkgs/by-name/de/deno/librusty_v8.nix rename to pkgs/by-name/de/deno/rusty-v8/default.nix diff --git a/pkgs/by-name/de/deno/librusty_v8-darwin-fix-__rust_no_alloc_shim_is_unstable_v2.patch b/pkgs/by-name/de/deno/rusty-v8/librusty_v8-darwin-fix-__rust_no_alloc_shim_is_unstable_v2.patch similarity index 100% rename from pkgs/by-name/de/deno/librusty_v8-darwin-fix-__rust_no_alloc_shim_is_unstable_v2.patch rename to pkgs/by-name/de/deno/rusty-v8/librusty_v8-darwin-fix-__rust_no_alloc_shim_is_unstable_v2.patch diff --git a/pkgs/by-name/de/deno/librusty_v8_no_downloads.patch b/pkgs/by-name/de/deno/rusty-v8/librusty_v8_no_downloads.patch similarity index 100% rename from pkgs/by-name/de/deno/librusty_v8_no_downloads.patch rename to pkgs/by-name/de/deno/rusty-v8/librusty_v8_no_downloads.patch diff --git a/pkgs/by-name/de/deno/librusty_v8_revert_-fno-lifetime-dse.patch b/pkgs/by-name/de/deno/rusty-v8/librusty_v8_revert_-fno-lifetime-dse.patch similarity index 100% rename from pkgs/by-name/de/deno/librusty_v8_revert_-fno-lifetime-dse.patch rename to pkgs/by-name/de/deno/rusty-v8/librusty_v8_revert_-fno-lifetime-dse.patch From 5ca96a0345d796f0b05c2587360de4a55ade5501 Mon Sep 17 00:00:00 2001 From: Mynacol Date: Thu, 30 Apr 2026 15:08:00 +0000 Subject: [PATCH 3/6] deno: Drop unneeded build flag This build flag is not exposed by GN, hence it cannot actually be set. I originally thought it is needed so that the rust parts after enabling the temporal api can be successfully built. --- pkgs/by-name/de/deno/rusty-v8/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/by-name/de/deno/rusty-v8/default.nix b/pkgs/by-name/de/deno/rusty-v8/default.nix index ee70ced5226a..c93f2117b36b 100644 --- a/pkgs/by-name/de/deno/rusty-v8/default.nix +++ b/pkgs/by-name/de/deno/rusty-v8/default.nix @@ -132,7 +132,6 @@ rustPlatform.buildRustPackage (finalAttrs: { "rustc_version=\"${rustc.version}\"" "rust_sysroot_absolute=\"${rustToolchain}\"" "rust_bindgen_root=\"${rustToolchain}\"" - "use_chromium_rust_toolchain=true" # To accomodate our newer rustc compiler "removed_rust_stdlib_libs=[\"adler\"]" "added_rust_stdlib_libs=[\"adler2\"]" From de67f8f4e8c4535f761f87054922561090aa8f3d Mon Sep 17 00:00:00 2001 From: Mynacol Date: Thu, 30 Apr 2026 15:14:00 +0000 Subject: [PATCH 4/6] deno: Update homepage URL --- pkgs/by-name/de/deno/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/de/deno/package.nix b/pkgs/by-name/de/deno/package.nix index 494a0111b55b..bcc620b3d62d 100644 --- a/pkgs/by-name/de/deno/package.nix +++ b/pkgs/by-name/de/deno/package.nix @@ -248,7 +248,7 @@ rustPlatform.buildRustPackage (finalAttrs: { }; meta = { - homepage = "https://deno.land/"; + homepage = "https://deno.com/"; changelog = "https://github.com/denoland/deno/releases/tag/v${finalAttrs.version}"; description = "Secure runtime for JavaScript and TypeScript"; longDescription = '' From 0058564cb50b6e9403793d38df7bc3b8a850f5ef Mon Sep 17 00:00:00 2001 From: Mynacol Date: Thu, 30 Apr 2026 14:57:00 +0000 Subject: [PATCH 5/6] deno: Stop setting `_LIBCPP_HARDENING_MODE` on rusty-v8 And rely on the upstream project. --- pkgs/by-name/de/deno/rusty-v8/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/by-name/de/deno/rusty-v8/default.nix b/pkgs/by-name/de/deno/rusty-v8/default.nix index c93f2117b36b..b781960359c1 100644 --- a/pkgs/by-name/de/deno/rusty-v8/default.nix +++ b/pkgs/by-name/de/deno/rusty-v8/default.nix @@ -144,6 +144,10 @@ rustPlatform.buildRustPackage (finalAttrs: { buildFeatures = [ "simdutf" ]; + # rusty-v8 has its own default hardening flags, which are "extensive" for release builds as long as `use_custom_libcxx` stays true. + # Avoids many warnings about redefined macros (on build failures) and uses the upstream flag. + hardeningDisable = [ "libcxxhardeningfast" ]; + checkFlags = [ # These tests probably fail due to a more recent rustc version (upstream: 1.89.0, here: 1.93.0) "--skip=ui" From 40712b38c53ea198038220928a3699cd3fecc798 Mon Sep 17 00:00:00 2001 From: Mynacol Date: Sun, 3 May 2026 19:56:00 +0000 Subject: [PATCH 6/6] deno: Disable _FORTIFY_SOURCE=3 on rusty-v8 According to Arch Linux, fortification level 3 is incompatible with some used functionality. Irrespective of that, the v8 build sets this as well, although on level 2 in our case. --- pkgs/by-name/de/deno/rusty-v8/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/de/deno/rusty-v8/default.nix b/pkgs/by-name/de/deno/rusty-v8/default.nix index b781960359c1..725ecebed0b3 100644 --- a/pkgs/by-name/de/deno/rusty-v8/default.nix +++ b/pkgs/by-name/de/deno/rusty-v8/default.nix @@ -144,9 +144,14 @@ rustPlatform.buildRustPackage (finalAttrs: { buildFeatures = [ "simdutf" ]; - # rusty-v8 has its own default hardening flags, which are "extensive" for release builds as long as `use_custom_libcxx` stays true. - # Avoids many warnings about redefined macros (on build failures) and uses the upstream flag. - hardeningDisable = [ "libcxxhardeningfast" ]; + hardeningDisable = [ + # rusty-v8 has its own default hardening flags, which are "extensive" for release builds as long as `use_custom_libcxx` stays true. + # Avoids many warnings about redefined macros (on build failures) and uses the upstream flag. + "libcxxhardeningfast" + # from Arch Linux: this uses malloc_usable_size, which is incompatible with fortification level 3 + # https://gitlab.archlinux.org/archlinux/packaging/packages/deno/-/blob/cd9bdf9e67381da413142413646bd8648807510a/PKGBUILD#L49 + "fortify3" + ]; checkFlags = [ # These tests probably fail due to a more recent rustc version (upstream: 1.89.0, here: 1.93.0)