Skip to content

Commit

Permalink
pkgs/vscode-oss: do not patch esbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
inclyc committed Jun 14, 2024
1 parent ecf188e commit 9436f86
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions pkgs/vscode-oss/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
buildGoModule,
cacert,
esbuild,
jq,
krb5,
libsecret,
Expand Down Expand Up @@ -83,32 +81,6 @@ let
};

platform = vscodePlatforms stdenv.hostPlatform;

esbuild' = esbuild.override {
buildGoModule =
args:
buildGoModule (
args
// rec {
version = "0.17.14";
src = fetchFromGitHub {
owner = "evanw";
repo = "esbuild";
rev = "v${version}";
hash = "sha256-4TC1d5FOZHUMuEMTcTOBLZZM+sFUswhyblI5HVWyvPA=";
};
vendorHash = "sha256-+BfxCyg0KkDQpHt/wycy/8CTG6YBA/VJvJFhhzUnSiQ=";
}
);
};

# replaces esbuild's download script with a binary from nixpkgs
patchEsbuild = path: version: ''
mkdir -p ${path}/node_modules/esbuild/bin
jq "del(.scripts.postinstall)" ${path}/node_modules/esbuild/package.json | sponge ${path}/node_modules/esbuild/package.json
sed -i 's/${version}/${esbuild'.version}/g' ${path}/node_modules/esbuild/lib/main.js
ln -s -f ${esbuild'}/bin/esbuild ${path}/node_modules/esbuild/bin/esbuild
'';
in

stdenv.mkDerivation (finalAttrs: {
Expand Down Expand Up @@ -260,8 +232,6 @@ stdenv.mkDerivation (finalAttrs: {
--ignore-scripts \
--ignore-engines
${patchEsbuild "./build" "0.12.6"}
${patchEsbuild "./extensions" "0.11.23"}
# patch shebangs of node_modules to allow binary packages to build
patchShebangs .
# put ripgrep binary into bin so postinstall does not try to download it
Expand Down

0 comments on commit 9436f86

Please sign in to comment.