add overlay to fix firebase-tools build error

This commit is contained in:
Melvin Ragusa
2026-02-06 23:00:28 +01:00
parent d0e80c7ba3
commit 951e135bce
2 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
# Standalone overlay for firebase-tools
# This file exports a single overlay function that forces `firebase-tools`
# to use `nodejs_22` when available, falling back to `nodejs` otherwise.
#
# It's intended to be imported directly in a host's `nixpkgs.overlays`,
# e.g. in `hosts/server/configuration.nix`.
final: prev:
let
# Prefer nodejs_22 if present in the previous package set; otherwise use nodejs.
nodejsChoice = if builtins.hasAttr "nodejs_22" prev then prev.nodejs_22 else prev.nodejs;
in
{
# Override firebase-tools to use the chosen Node.js package.
firebase-tools = prev.firebase-tools.override {
nodejs = nodejsChoice;
};
}