With this shell.nix
let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.11";
pkgs = import nixpkgs { config = {}; overlays = []; };
in pkgs.mkShellNoCC {
packages = with pkgs; [
(pkgs.python311.withPackages (
pythonPackageSet:
builtins.attrValues {
inherit (pythonPackageSet)
jupyterlab
# jupyterlab-git
;
}
))
];
}
when nix-shell --pure
git
is not found as expected, can someone explain why in a python
a git
installed outside of nix-shell pure scope still is found ? Background: I want to check if an extra binary is contained in a set as in that example or if it is already provided with the python package itself:
[user:~/nix-python-shell]$ nix-shell --pure
[nix-shell:~/nix-python-shell]$ python
>>> import os
>>> os.system(r'"git"')
# or even when jupyterlab-git in shell.nix
>>> from jupyterlab_git.git import Git
>>> Git().status('~/.nix-config')