-
Notifications
You must be signed in to change notification settings - Fork 1
/
shell.nix
36 lines (31 loc) · 1 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
# https://www.youtube.com/watch?v=TbIHRHy7_JM
# https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/python.section.md#pythonbuildenv-arguments
let
pkgs = import <nixpkgs> { };
# Python 38 with some dependencies
py-dev = (pkgs.python38.override {
enableOptimizations = true;
reproducibleBuild = false;
}).buildEnv.override {
extraLibs = with pkgs.python38Packages; [ importmagic epc ];
ignoreCollisions = true;
};
in
pkgs.mkShell {
buildInputs = with pkgs; [
py-dev pipenv
nodePackages.pyright # lsp
vagrant # for enoslib
libpcap # For fig5.py
# keep this line if you use bash
bashInteractive
];
# Set PYTHONPATH to empty to fix `pipenv install`
PYTHONPATH = "";
# libpcap lib should be LD_LIBRARY_PATH for fig5. You can execute
# it with `pipenv run sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH python
# fig5.py`
LD_LIBRARY_PATH="${pkgs.libpcap}/lib";
shellHook = ''
'';
}