Skip to content

Instantly share code, notes, and snippets.

@imiric
Created October 5, 2024 21:03
Show Gist options
  • Save imiric/3422258c4df9dacb4128ff94d31e9079 to your computer and use it in GitHub Desktop.
Save imiric/3422258c4df9dacb4128ff94d31e9079 to your computer and use it in GitHub Desktop.
Python with pyenv on NixOS
# Nix derivation to enter a shell with dependencies needed to build Python with pyenv.
# Start a shell with:
# $ nix-shell --run zsh ./pyenv-shell.nix
# Then install a Python version as usual. E.g.:
# $ pyenv install 3.12.5
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "pybuild";
buildInputs = [
bzip2
git
libffi
libxcrypt
libxml2
libxslt
libzip
lzma
ncurses
openssl
pkg-config
readline
sqlite
stdenv.cc.cc
taglib
tk
zlib
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment