From e8c67529a53bbf1c8746ad98ec7365981ae6bb5b Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 15 Oct 2021 01:26:23 +0200 Subject: [PATCH 1/2] esbuild_netlify: init --- pkgs/development/tools/esbuild/netlify.nix | 22 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/development/tools/esbuild/netlify.nix diff --git a/pkgs/development/tools/esbuild/netlify.nix b/pkgs/development/tools/esbuild/netlify.nix new file mode 100644 index 000000000000..efd5b917e9cd --- /dev/null +++ b/pkgs/development/tools/esbuild/netlify.nix @@ -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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e322993db783..9351733ff439 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { }; From 5c339ff41eda06cfdf0d21e692b033a2973d8a61 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 15 Oct 2021 01:27:03 +0200 Subject: [PATCH 2/2] netlify-cli: Fix by using explicit esbuild fork package --- pkgs/development/node-packages/default.nix | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/pkgs/development/node-packages/default.nix b/pkgs/development/node-packages/default.nix index bbc9a804aa74..ccd0b19e1ad3 100644 --- a/pkgs/development/node-packages/default.nix +++ b/pkgs/development/node-packages/default.nix @@ -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 { @@ -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 {