Rename pyshell to pythonWrapped

Focus just on wrapping python for venv creation (using copies) rather
than being activated every time
This commit is contained in:
Evie Litherland-Smith 2025-02-10 10:05:48 +00:00
parent 1f86853aa2
commit 15b96e387c

View file

@ -1,7 +1,6 @@
{
pkgs ? import <nixpkgs> { },
python3 ? pkgs.python3Full,
extraPackages ? [ ],
extraLibs ? [ ],
}:
let
@ -25,17 +24,4 @@ let
'';
};
in
pkgs.mkShellNoCC {
packages = [
pythonWrapped
pkgs.uv
] ++ extraPackages;
shellHook = ''
if [ ! -d .venv ]; then
${pythonWrapped}/bin/python3 -m venv .venv
else
${pythonWrapped}/bin/python3 -m venv --upgrade .venv
fi
[ -f .venv/bin/activate ] && source .venv/bin/activate
'';
}
pkgs.mkShellNoCC { packages = [ pythonWrapped ]; }