Last active
September 2, 2022 07:08
-
-
Save Th0rgal/4a44b635ab3639212662ad73f8f95a1e to your computer and use it in GitHub Desktop.
What binaries to install?
This file contains hidden or 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> { }; | |
let pythonPackages = python39Packages; | |
in pkgs.mkShell rec { | |
name = "impurePythonEnv"; | |
venvDir = "./env"; | |
buildInputs = [ | |
# A Python interpreter including the 'venv' module is required to bootstrap | |
# the environment. | |
pythonPackages.python | |
# This execute some shell code to initialize a venv in $venvDir before | |
# dropping into the shell | |
pythonPackages.venvShellHook | |
# required by fastecdsa | |
gmp | |
]; | |
# Run this command, only after creating the virtual environment | |
postVenvCreation = '' | |
unset SOURCE_DATE_EPOCH | |
pip install -r requirements.txt | |
''; | |
# Now we can execute any commands within the virtual environment. | |
# This is optional and can be left out to run pip manually. | |
postShellHook = '' | |
# allow pip to install wheels | |
unset SOURCE_DATE_EPOCH | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment