Created
May 9, 2025 19:36
-
-
Save tlehman/65cef110daa2d6bcffe4f8c74407661b to your computer and use it in GitHub Desktop.
Nix shell file to `pip install grip` so you don't have to pollute your global filesystem with python stuff
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
{ pkgs ? import <nixpkgs> {} }: | |
pkgs.mkShell { | |
buildInputs = [ | |
(pkgs.python3.withPackages (ps: [ ps.pip ])) | |
]; | |
shellHook = '' | |
export VENV_DIR=$(mktemp -d) | |
python -m venv $VENV_DIR | |
source $VENV_DIR/bin/activate | |
pip install grip | |
echo "Virtual environment is ready and grip is installed." | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put this into a file called
shell.nix
directory with markdown files and runnix-shell
, then you will have this package. When youexit
, all python stuff will be gone, like it was just a bad dream.