diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2023-01-28 04:20:00 +0000 |
---|---|---|
committer | Mario Rodas <marsam@users.noreply.github.com> | 2023-01-28 04:20:00 +0000 |
commit | abb2fde32d4487241a3c934f31ed40ca1f333f89 (patch) | |
tree | a69c22b5098a04013ce27d68c1df7132779fc474 /pkgs/servers/openvscode-server | |
parent | 0ee931c4a91dce8fa6077b904aeed2501573f95b (diff) |
openvscode-server: fix build
Diffstat (limited to 'pkgs/servers/openvscode-server')
-rw-r--r-- | pkgs/servers/openvscode-server/default.nix | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/pkgs/servers/openvscode-server/default.nix b/pkgs/servers/openvscode-server/default.nix index e4f558c790b2b..e6e7130e3fdb6 100644 --- a/pkgs/servers/openvscode-server/default.nix +++ b/pkgs/servers/openvscode-server/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, makeWrapper, runCommand +{ lib, stdenv, fetchFromGitHub, buildGoModule, makeWrapper, runCommand , cacert, moreutils, jq, git, pkg-config, yarn, python3 , esbuild, nodejs-16_x-openssl_1_1, libsecret, xorg, ripgrep , AppKit, Cocoa, Security, cctools }: @@ -17,12 +17,25 @@ let aarch64-darwin = "darwin-arm64"; }.${system} or (throw "Unsupported system ${system}"); + esbuild' = esbuild.override { + buildGoModule = args: buildGoModule (args // rec { + version = "0.16.17"; + src = fetchFromGitHub { + owner = "evanw"; + repo = "esbuild"; + rev = "v${version}"; + hash = "sha256-8L8h0FaexNsb3Mj6/ohA37nYLFogo5wXkAhGztGUUsQ="; + }; + 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 + 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 rec { |