-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
35 lines (34 loc) · 900 Bytes
/
default.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
with import <nixpkgs> {};
with pkgs.python27Packages;
stdenv.mkDerivation {
name = "impurePythonEnv";
buildInputs = [
taglib
openssl
git
libxml2
libxslt
libzip
python27Full
python27Packages.virtualenv
stdenv
unzip
zlib ];
src = null;
# When used as `nix-shell --pure`
shellHook = ''
PID=$$
unset http_proxy
export GIT_SSL_CAINFO=/etc/ssl/certs/ca-bundle.crt
# set SOURCE_DATE_EPOCH so that we can use python wheels
SOURCE_DATE_EPOCH=$(date +%s)
virtualenv --no-setuptools --clear --quiet /tmp/$PID/venv
rm -f get-pip.py
wget -q -c https://bootstrap.pypa.io/get-pip.py
/tmp/$PID/venv/bin/python get-pip.py
/tmp/$PID/venv/bin/pip install --quiet --upgrade -r requirements.txt
/tmp/$PID/venv/bin/pip install --quiet --upgrade -r dev-requirements.txt
export PATH=/tmp/$PID/venv/bin:$PATH
ln -s /tmp/$PID/venv venv
'';
}