-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Labels
enhancementNew feature or requestNew feature or request
Description
We can use venvShellHook with plain shell.nix with something like
let
pkgs = import <nixpkgs> { };
pyPackages = pkgs.python311Packages;
in pkgs.mkShell {
name = "py";
venvDir = "./.venv";
buildInputs = [
pyPackages.pip
pyPackages.venvShellHook
pkgs.ruff # linter
pkgs.python311
];
postShellHook = ''
pip install poetry
unset SOURCE_DATE_EPOCH
'';
}
And with vanilla flake with something like:
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [pkgs.python311Packages.pip pkgs.python311Packages.venvShellHook];
venvDir = "./.venv";
};
But with numtide / devshell it seems like I cannot use venvShellHook and hence no way to have the sweet virtual env created for me as I cd into the directory.
jlbribeiro
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request