Skip to content

Commit 7d6a075

Browse files
committed
Add Nix expression to build and run webpack
After generating yarn.lock, simply run `nix-build` to create a derivation containg the webpacked plugin, package.json and the hie-vscode wrappers.
1 parent 922dc4a commit 7d6a075

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

default.nix

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{ pkgs ? import <nixpkgs> {} }:
2+
with pkgs;
3+
pkgs.mkYarnPackage {
4+
name = "vscode-hie-server";
5+
src = ./.;
6+
packageJSON = ./package.json;
7+
yarnLock = ./yarn.lock;
8+
9+
installPhase = ''
10+
mkdir -p "$out/dist"
11+
yarn vscode:prepublish --output-path "$out/dist"
12+
mv deps/vscode-hie-server/{package.json,hie-vscode.sh,hie-vscode.bat} "$out"
13+
'';
14+
15+
distPhase = ''
16+
true
17+
'';
18+
}

0 commit comments

Comments
 (0)