From c86ace24959226ac868c534bb9956b9f6114aad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliv=C3=A9r=20Falvai?= Date: Mon, 24 Feb 2025 19:44:06 +0100 Subject: [PATCH 1/2] deno: re-enable lld on Darwin lld is no longer broken in nix, and it results in a nice build time improvement Co-authored-by: 06kellyjac --- pkgs/by-name/de/deno/package.nix | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/de/deno/package.nix b/pkgs/by-name/de/deno/package.nix index a4a68599c28f..822652f2b038 100644 --- a/pkgs/by-name/de/deno/package.nix +++ b/pkgs/by-name/de/deno/package.nix @@ -12,6 +12,7 @@ }, libffi, sqlite, + lld, }: let @@ -32,24 +33,24 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-t44Q4yBdcYAk6jkRrzAHXBsJTsRTHAD95Wyxd3waaHc="; postPatch = '' - # upstream uses lld on aarch64-darwin for faster builds - # within nix lld looks for CoreFoundation rather than CoreFoundation.tbd and fails - substituteInPlace .cargo/config.toml --replace-fail "-fuse-ld=lld " "" - # Use patched nixpkgs libffi in order to fix https://github.com/libffi/libffi/pull/857 substituteInPlace ext/ffi/Cargo.toml --replace-fail "libffi = \"=3.2.0\"" "libffi = { version = \"3.2.0\", features = [\"system\"] }" ''; # uses zlib-ng but can't dynamically link yet # https://github.com/rust-lang/libz-sys/issues/158 - nativeBuildInputs = [ - rustPlatform.bindgenHook - # required by libz-ng-sys crate - cmake - # required by deno_kv crate - protobuf - installShellFiles - ]; + nativeBuildInputs = + [ + rustPlatform.bindgenHook + # required by libz-ng-sys crate + cmake + # required by deno_kv crate + protobuf + installShellFiles + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + lld + ]; configureFlags = lib.optionals stdenv.cc.isClang [ # This never worked with clang, but became a hard error recently: https://github.com/llvm/llvm-project/commit/3d5b610c864c8f5980eaa16c22b71ff1cf462fae From 482ffc541c8ffb8d2d09018dba09667d8d2e5e7f Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Tue, 25 Feb 2025 10:47:48 +0000 Subject: [PATCH 2/2] deno: 2.2.1 -> 2.2.2 --- pkgs/by-name/de/deno/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/de/deno/package.nix b/pkgs/by-name/de/deno/package.nix index 822652f2b038..29b700b4c2f5 100644 --- a/pkgs/by-name/de/deno/package.nix +++ b/pkgs/by-name/de/deno/package.nix @@ -20,17 +20,17 @@ let in rustPlatform.buildRustPackage rec { pname = "deno"; - version = "2.2.1"; + version = "2.2.2"; src = fetchFromGitHub { owner = "denoland"; repo = "deno"; tag = "v${version}"; - hash = "sha256-WXAUsBC3nAJcuUB753dpM/WDzqWu+e/Kt/BrwQkk/dY="; + hash = "sha256-ogvrDDwiMmsTRRpXwlH5VWhtnrSkRZErfjj2lhirALQ="; }; useFetchCargoVendor = true; - cargoHash = "sha256-t44Q4yBdcYAk6jkRrzAHXBsJTsRTHAD95Wyxd3waaHc="; + cargoHash = "sha256-eaB6e6DGWbQKVR+huHBUbXGjzrY/4xGYdu8tXp+6jBM="; postPatch = '' # Use patched nixpkgs libffi in order to fix https://github.com/libffi/libffi/pull/857