-
-
Notifications
You must be signed in to change notification settings - Fork 209
Expand file tree
/
Copy pathdefault.nix
More file actions
29 lines (28 loc) · 800 Bytes
/
default.nix
File metadata and controls
29 lines (28 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# from https://nixos.wiki/wiki/Python#Emulating_virtualenv_with_nix-shell
let
pkgs = import <nixpkgs> {};
in pkgs.mkShell {
buildInputs = [
pkgs.act
pkgs.gnumake
pkgs.kubernetes-helm
pkgs.libffi
pkgs.podman
pkgs.poetry
pkgs.ripgrep
pkgs.uv
pkgs.python312
pkgs.python312.pkgs.black
pkgs.python312.pkgs.cffi
pkgs.python312.pkgs.pip
pkgs.python312.pkgs.setuptools
];
shellHook = ''
# Tells pip to put packages into $PIP_PREFIX instead of the usual locations.
# See https://pip.pypa.io/en/stable/user_guide/#environment-variables.
export PIP_PREFIX=$(pwd)/_build/pip_packages
export PYTHONPATH="$PIP_PREFIX/${pkgs.python312.sitePackages}:$PYTHONPATH"
export PATH="$PIP_PREFIX/bin:$PATH"
unset SOURCE_DATE_EPOCH
'';
}