Update pyshell template, remove fhsenv template
pyshell sets up shell with python3Full and sets LD_LIBRARY_PATH. Shell hook checks and makes venv, installs standard packages.
This commit is contained in:
parent
353f862ce7
commit
9bb6652055
20
templates
20
templates
|
@ -1,19 +1,15 @@
|
||||||
nix-mode
|
nix-mode
|
||||||
|
|
||||||
(fhsenv "let" n
|
(pyshell "let" n
|
||||||
> "pkgs = import " (p "<nixpkgs>") " { };" n
|
> "pkgs = import " (p "<nixpkgs>") " { };" n
|
||||||
> "fhs = pkgs.buildFHSUserEnv {" n
|
|
||||||
> "name = \"" (p "env") "\";" n
|
|
||||||
> "targetPkgs = _: [ " q " ];" n
|
|
||||||
> "profile = \"\";" n
|
|
||||||
> "};" n
|
|
||||||
"in" n
|
"in" n
|
||||||
> "fhs.env")
|
"pkgs.mkShell {" n
|
||||||
|
> "packages = with pkgs; [ " (p "python3Full") " uv " q " ];" n
|
||||||
(pyshell "import /etc/nixos/system/home/programming/pyshell.nix rec {" n
|
> "env.LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [stdenv.cc.cc.lib libz];" n
|
||||||
> "pkgs = import " (p "<nixpkgs>") " { };" n
|
> "shellHook = ''" n
|
||||||
> "python3 = pkgs." (p "python311Full") ";" n
|
> "[ ! -d .venv/ ] && python3 -m venv --copies --without-pip --prompt $(basename $(readlink -f .)) .venv" n
|
||||||
> "extraPackages = with pkgs; [ uv poetry pre-commit " q " ];" n
|
> "[ -f .venv/bin/activate ] && source .venv/bin/activate && uv pip install pyflakes isort -e ." n
|
||||||
|
> "'';" n
|
||||||
"}")
|
"}")
|
||||||
|
|
||||||
python-base-mode
|
python-base-mode
|
||||||
|
|
Loading…
Reference in a new issue