-
-
Save AshyIsMe/aed9399d6290deb9be47fca01cf269d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> {}; | |
with python27Packages; | |
stdenv.mkDerivation { | |
name = "impurePythonEnv"; | |
src = null; | |
buildInputs = [ | |
# these packages are required for virtualenv and pip to work: | |
# | |
python27Full | |
python27Packages.virtualenv | |
python27Packages.pip | |
# the following packages are related to the dependencies of your python | |
# project. | |
# In this particular example the python modules listed in the | |
# requirements.txt require the following packages to be installed locally | |
# in order to compile any binary extensions they may require. | |
# | |
taglib | |
openssl | |
git | |
libxml2 | |
libxslt | |
libzip | |
stdenv | |
zlib | |
]; | |
shellHook = '' | |
# set SOURCE_DATE_EPOCH so that we can use python wheels | |
SOURCE_DATE_EPOCH=$(date +%s) | |
virtualenv --no-setuptools venv | |
export PATH=$PWD/venv/bin:$PATH | |
pip install -r requirements.txt | |
''; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nix-shell | |
these paths will be fetched (0.03 MiB download, 0.16 MiB unpacked): | |
/nix/store/2h5kilbwjpjs72w7k0y7j4b1yd343j6k-libxslt-1.1.33-py | |
copying path '/nix/store/2h5kilbwjpjs72w7k0y7j4b1yd343j6k-libxslt-1.1.33-py' from 'https://cache.nixos.org'... | |
New python executable in /home/aaron/codebases/solokeys/venv/bin/python2.7 | |
Also creating executable in /home/aaron/codebases/solokeys/venv/bin/python | |
Installing pip, wheel... | |
done. | |
Traceback (most recent call last): | |
File "/home/aaron/codebases/solokeys/venv/bin/pip", line 6, in <module> | |
from pip._internal.main import main | |
ImportError: No module named main | |
[nix-shell:~/codebases/solokeys]$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pandas |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment