-
Notifications
You must be signed in to change notification settings - Fork 4
/
shell.nix
39 lines (32 loc) · 978 Bytes
/
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
# from https://nixos.wiki/wiki/Python#Emulating_virtualenv_with_nix-shell
let
pkgs = import <nixpkgs> {};
in pkgs.mkShell {
buildInputs = [
pkgs.gnumake
pkgs.act
pkgs.poetry
pkgs.nodePackages.yaml-language-server
pkgs.yamlfix
# Python version
pkgs.python39
pkgs.python39.pkgs.pip
# Neovim pylsp and tools
pkgs.python39.pkgs.setuptools
pkgs.python39.pkgs.pydocstyle
pkgs.python39.pkgs.python-lsp-server
pkgs.python39.pkgs.pyls-flake8
pkgs.python39.pkgs.black
pkgs.python39.pkgs.isort
# Tools
pkgs.python39.pkgs.ipython
];
shellHook = ''
# Tells pip to put packages into $PIP_PREFIX instead of the usual locations.
# See https://pip.pypa.io/en/stable/user_guide/#environment-variables.
export PIP_PREFIX=$(pwd)/_build/pip_packages
export PYTHONPATH="$PIP_PREFIX/${pkgs.python39.sitePackages}:$PYTHONPATH"
export PATH="$PIP_PREFIX/bin:$PATH"
unset SOURCE_DATE_EPOCH
'';
}