git.iko.soy/typeable/nixpkgs
on master help sign in
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

commit3eac120c3d228289f218c2db971849c39202e7f4 authorFlorian Beeres <yuuki@protonmail.com> dateTue 11 May 2021, 00:17 (6 years ago) parent0899b83
1 file changed+21−1
pkgs/development/node-packages/default.nix+21−1
pkgs/development/node-packages/default.nix+21−1
@@ -1,4 +1,4 @@
1−{ pkgs, nodejs, stdenv }:
1+{ pkgs, nodejs, stdenv, fetchFromGitHub }:
22
33let
44 since = (version: pkgs.lib.versionAtLeast nodejs.version version);
@@ -209,6 +209,26 @@ let
209209 '';
210210 };
211211
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+ };
231+
212232 ssb-server = super.ssb-server.override {
213233 buildInputs = [ pkgs.automake pkgs.autoconf self.node-gyp-build ];
214234 meta.broken = since "10";