Skip to content

Instantly share code, notes, and snippets.

@araa47
araa47 / PyNixDirEnvReadme.md
Last active February 8, 2024 10:51
Python3 Dev Environment with Pipenv using Nix and direnv for Linux and macOS

System Set-Up

  1. Install nix on your system curl https://nixos.org/nix/install | sh
  2. . ~/.nix-profile/etc/profile.d/nix.sh
  3. Install direnv nix-env -i direnv
  4. Add hook into shell by running eval "$(direnv hook bash)" , you will need to add this to .bash_profile to make it presistant

Project Set-Up

Create a shell.nix file in your project with the following content. This has python 3.7 and pipenv as buildInputs