-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
39 lines (37 loc) · 765 Bytes
/
shell.nix
File metadata and controls
39 lines (37 loc) · 765 Bytes
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
{
pkgs ? import <nixpkgs> { },
}:
pkgs.mkShell rec {
name = "entity-wiki";
nativeBuildInputs = with pkgs; [
pkgs.python312
pkgs.python312Packages.pip
nodePackages.nodejs
black
pyright
taplo
vscode-langservers-extracted
yaml-language-server
typescript-language-server
emmet-ls
markdown-oxide
zlib
];
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
pkgs.stdenv.cc.cc
pkgs.zlib
];
shellHook = ''
if [ -d .venv ]; then
source .venv/bin/activate
else
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
fi
if [ ! -d node_modules ]; then
npm i
fi
echo "${name} nix-shell activated: $(which python) $(which npm)"
'';
}