forked from terryyin/translate-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
27 lines (24 loc) · 651 Bytes
/
Copy pathshell.nix
File metadata and controls
27 lines (24 loc) · 651 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
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
let
apple_sdk = darwin.apple_sdk.frameworks;
in mkShell {
name = "translate-python";
MYSQL_HOME = builtins.getEnv "MYSQL_HOME";
MYSQL_DATADIR = builtins.getEnv "MYSQL_DATADIR";
buildInputs = [
python3Full
python39Packages.pip
python39Packages.setuptools
vim
git
];
shellHook = ''
export PYTHONUSERBASE=$PWD/.local
export USER_SITE=`python -c "import site; print(site.USER_SITE)"`
# bug? it will print 3.8 somehow
export USER_SITE=${"\$\{USER_SITE//3.8/3.9}"}
export PYTHONPATH=$PYTHONPATH:$USER_SITE
export PATH=$PATH:$PYTHONUSERBASE/bin
'';
}