From 0e7b17b468ff54d050d255c18fdaf556cb2c43fb Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Sat, 17 May 2025 15:57:48 -0400 Subject: [PATCH] fix(darwin): resolve nodejs-related build issues --- darwin/sketchybar/default.nix | 2 +- overlays/default.nix | 22 ++++++++++++---------- pkgs/nvim/default.nix | 2 +- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/darwin/sketchybar/default.nix b/darwin/sketchybar/default.nix index bd21805..cf0c65c 100644 --- a/darwin/sketchybar/default.nix +++ b/darwin/sketchybar/default.nix @@ -16,7 +16,7 @@ in { hm.my.sketchybar.enable = true; fonts.packages = with pkgs; [ - sketchybar-app-font + unstable.sketchybar-app-font ]; }; } diff --git a/overlays/default.nix b/overlays/default.nix index 2c67e88..69ed0ca 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,7 +1,4 @@ {inputs, ...}: { - rust-overlay = inputs.rust-overlay.overlays.default; - vscode-extensions = inputs.nix-vscode-extensions.overlays.default; - # This one brings our custom packages from the 'pkgs' directory additions = final: prev: { @@ -17,13 +14,18 @@ # This one contains whatever you want to overlay # You can change versions, add patches, set compilation flags, anything really. # https://nixos.wiki/wiki/Overlays - modifications = final: prev: - if prev.stdenv.isDarwin - then { - # avoid build failure on darwin - inherit (final.unstable) ghostscript; - } - else {}; + modifications = final: prev: { + # address build failure on darwin, remove after 25.05 + nodejs_20-slim = prev.nodejs-slim_22; + nodejs_20 = prev.nodejs_22; + nodejs-slim = prev.nodejs-slim_22; + nodejs = prev.nodejs_22; + }; + + # External overlays + # Included after the above to ensure modifications are applied + rust-overlay = inputs.rust-overlay.overlays.default; + vscode-extensions = inputs.nix-vscode-extensions.overlays.default; # When applied, the unstable nixpkgs set (declared in the flake inputs) will # be accessible through 'pkgs.unstable' diff --git a/pkgs/nvim/default.nix b/pkgs/nvim/default.nix index 1193a43..fc593ac 100644 --- a/pkgs/nvim/default.nix +++ b/pkgs/nvim/default.nix @@ -8,7 +8,7 @@ icons = import ./config/icons.nix; pkgsMaster = inputs.master.legacyPackages.${system}; nixvimModule = { - pkgs = inputs.nixpkgs.legacyPackages.${system}; + inherit pkgs; module = import ./config; extraSpecialArgs = {inherit icons pkgsMaster;}; };