Update pyshell template

This commit is contained in:
Evie Litherland-Smith 2024-10-02 14:00:52 +01:00
parent 77af14bed0
commit 41be433044

View file

@ -205,19 +205,6 @@ python-base-mode
nix-mode
(pkgs "pkgs = import " (p "<nixpkgs>") " {};")
(poetry2nix "poetry2nix = (builtins.getFlake \"github:nix-community/poetry2nix\").lib.mkPoetry2Nix {inherit pkgs;};")
(pyshell "let" n
> "pkgs = import " (p "<nixpkgs>") " {};" n
> "in pkgs.mkShellNoCC {" n
> "packages = with pkgs; [" n
> "poetry" n
> (p "python3Full") n
> q n
> "];" n
> "shellHook = ''" n
> "export LD_LIBRARY_PATH=${pkgs.stdenv.cc.cc.lib}/lib:${pkgs.zlib}/lib" n
> "'';" n
> "}")
(pyderivation "{ buildPythonPackage, " (p "poetry-core" build) ", " (p "" dependencies) "}:" n
"buildPythonPackage {" n
> "pname = \"" (p "package") "\";" n
@ -231,6 +218,19 @@ nix-mode
> "python3 = " (p "pkgs.python3") ";" n
"in" n
> "python3.pkgs.callPackage ./derivation.nix {" q "}")
(pyshell "let" n
> "pkgs = import " (p "<nixpkgs>") " {};" n
> "python = pkgs." (p "python3.override { self=python; packageOverrides = final: prev: {}; }") ";"n
> "in pkgs.mkShellNoCC {" n
> "packages = [" n
> "(python.withPackages(" n
> "ps: with ps; ["n
> (p "tkinter") n
> q n
> "]" n
> "))" n
> "];" n
> "}")
envrc-file-mode