netlify-cli: fix build

This commit uses the ESBUILD_BINARY_PATH env variable of esbuild to
supply a Nix managed esbuild binary. Otherwise the postInstall script
would try to make a network request.

See below links for more info:

https://github.com/evanw/esbuild/pull/597/files
https://docs.netlify.com/configure-builds/file-based-configuration/#functions

authored by Florian Beeres and committed by Jonathan Ringer 3eac120c 0899b830

+21 -1
+21 -1
pkgs/development/node-packages/default.nix
··· 1 - { pkgs, nodejs, stdenv }: 1 + { pkgs, nodejs, stdenv, fetchFromGitHub }: 2 2 3 3 let 4 4 since = (version: pkgs.lib.versionAtLeast nodejs.version version); ··· 208 208 ]} 209 209 ''; 210 210 }; 211 + 212 + netlify-cli = 213 + let 214 + esbuild = pkgs.esbuild.overrideAttrs (old: rec { 215 + version = "0.11.14"; 216 + 217 + src = fetchFromGitHub { 218 + owner = "evanw"; 219 + repo = "esbuild"; 220 + rev = "v${version}"; 221 + sha256 = "sha256-N7WNam0zF1t++nLVhuxXSDGV/JaFtlFhufp+etinvmM="; 222 + }; 223 + 224 + }); 225 + in 226 + super.netlify-cli.override { 227 + preRebuild = '' 228 + export ESBUILD_BINARY_PATH="${esbuild}/bin/esbuild" 229 + ''; 230 + }; 211 231 212 232 ssb-server = super.ssb-server.override { 213 233 buildInputs = [ pkgs.automake pkgs.autoconf self.node-gyp-build ];