-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathshell.nix
43 lines (39 loc) · 1.04 KB
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{ pkgs ? import <nixpkgs> { } }:
let
sources = import nix/sources.nix;
niv-pkgs = import sources.nixpkgs { };
niv-unstable = import sources.nixpkgs-unstable { };
print-versions = pkgs.writeShellScriptBin "print-versions" ''
echo nixos stable:
${niv-pkgs.tree-sitter}/bin/tree-sitter --version
${niv-pkgs.emscripten}/bin/emcc --version
echo nixos unstable:
${niv-unstable.tree-sitter}/bin/tree-sitter --version
${niv-unstable.emscripten}/bin/emcc --version
'';
update-wasm = pkgs.writeShellScriptBin "update-wasm" ''
nix-build build-wasm.nix
rm wasm/*
cp result/* wasm/
chmod 644 wasm/*
'';
manual-test = pkgs.writeShellScriptBin "manual-test" ''
npm run build \
&& npm start . -- --user-data-dir data/ --disable-extensions
'';
in
pkgs.mkShell {
buildInputs = with pkgs; [
python3
nodejs-12_x
nodePackages.node-gyp
# Code formatting
nodePackages.prettier
update-wasm
manual-test
#print-versions
];
shellHook = ''
export CODIUM_PATH=${pkgs.vscodium}
'';
}