Skip to content

Commit

Permalink
Merge pull request #141682 from hercules-ci/fix-netlify
Browse files Browse the repository at this point in the history
Fix `netlify-cli` build
  • Loading branch information
roberth authored Oct 15, 2021
2 parents e496e1b + 5c339ff commit bcd05cd
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 14 deletions.
17 changes: 3 additions & 14 deletions pkgs/development/node-packages/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ pkgs, nodejs, stdenv, applyPatches, fetchFromGitHub, fetchpatch, fetchurl }:

let
inherit (pkgs) lib;
since = (version: pkgs.lib.versionAtLeast nodejs.version version);
before = (version: pkgs.lib.versionOlder nodejs.version version);
super = import ./composition.nix {
Expand Down Expand Up @@ -319,23 +320,11 @@ let
};

netlify-cli =
let
esbuild = pkgs.esbuild.overrideAttrs (old: rec {
version = "0.13.6";

src = fetchFromGitHub {
owner = "netlify";
repo = "esbuild";
rev = "v${version}";
sha256 = "0asjmqfzdrpfx2hd5hkac1swp52qknyqavsm59j8xr4c1ixhc6n9";
};

});
in
super.netlify-cli.override {
preRebuild = ''
export ESBUILD_BINARY_PATH="${esbuild}/bin/esbuild"
export ESBUILD_BINARY_PATH="${pkgs.esbuild_netlify}/bin/esbuild"
'';
meta.maintainers = with lib.maintainers; [ roberth ];
};

ssb-server = super.ssb-server.override {
Expand Down
22 changes: 22 additions & 0 deletions pkgs/development/tools/esbuild/netlify.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{ buildGoModule, fetchFromGitHub, lib }:

buildGoModule rec {
pname = "esbuild";
version = "0.13.6";

src = fetchFromGitHub {
owner = "netlify";
repo = "esbuild";
rev = "v${version}";
sha256 = "0asjmqfzdrpfx2hd5hkac1swp52qknyqavsm59j8xr4c1ixhc6n9";
};

vendorSha256 = "sha256-2ABWPqhK2Cf4ipQH7XvRrd+ZscJhYPc3SV2cGT0apdg=";

meta = with lib; {
description = "A fork of esbuild maintained by netlify";
homepage = "https://github.com/netlify/esbuild";
license = licenses.mit;
maintainers = with maintainers; [ roberth ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1614,6 +1614,8 @@ with pkgs;

esbuild = callPackage ../development/tools/esbuild { };

esbuild_netlify = callPackage ../development/tools/esbuild/netlify.nix { };

essentia-extractor = callPackage ../tools/audio/essentia-extractor { };

esh = callPackage ../tools/text/esh { };
Expand Down

0 comments on commit bcd05cd

Please sign in to comment.