-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathshell.nix
More file actions
54 lines (47 loc) · 1.17 KB
/
shell.nix
File metadata and controls
54 lines (47 loc) · 1.17 KB
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
44
45
46
47
48
49
50
51
52
53
with import <nixpkgs> {};
let
python = pkgs.python311;
poetry = pkgs.poetry.override {
python3 = python;
};
in
mkShell {
NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [
nss
sane-backends
nspr
zlib
libglvnd
gcc
openssl
openssl_legacy
bzip2
libffi
readline
libgcc
ncurses
stdenv.cc
stdenv.cc.libc stdenv.cc.libc_dev
];
buildInputs = [
pkgs.poetry
pkgs.python311
pkgs.python311Packages.pip
pkgs.python311Packages.virtualenv
pkgs.python311Packages.unicurses
pkgs.python311Packages.gnureadline
pkgs.python311Packages.pyopenssl
pkgs.python311Packages.cython
pkgs.python311Packages.cytoolz
pkgs.pythonManylinuxPackages.manylinux2014Package
pkgs.cmake
];
# NIX_LD = builtins.readFile "${stdenv.cc}/nix-support/dynamic-linker";
shellHook = ''
set -e
export LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib.outPath}/lib:${pkgs.pythonManylinuxPackages.manylinux2014Package}/lib:$LD_LIBRARY_PATH";
echo 'Spinning up Python Virtual Environment in .nix-venv directory 🐍'
${pkgs.python311.interpreter} -m venv .nix-venv
export PATH=$PWD/.nix-venv/bin:$PATH
'';
}