Update pyshell template to use pyproject-nix

This commit is contained in:
Evie Litherland-Smith 2024-11-25 13:48:43 +00:00
parent e6b866e880
commit b83631bfa4

View file

@ -192,22 +192,21 @@ nix-mode
"in" n
> "python3.pkgs.callPackage ./derivation.nix {" q "}")
(pyshell "let" n
> "pkgs = import " (p "<nixpkgs>") " {};" n
> "pkgs = import " (p "<nixpkgs>") " { };" n
> "pyproject-nix = import (builtins.fetchGit {" n
> "url = \"https://github.com/pyproject-nix/pyproject.nix.git\";" n
> "}) { inherit (pkgs) lib; };" n
> "python3 = pkgs." (p "python3") ";" n
> "in pkgs.mkShellNoCC {" n
> "packages = [" n
> "(python3.withPackages(" n
> "ps: with ps; ["n
> (p "tkinter mypy") n
> "]" n
> (p "++ (callPackage ./derivation.nix { }).dependencies") n
> "))" n
> "];" n
> "project = pyproject-nix.lib.project.loadPoetryPyproject { projectRoot = ./.; };" n
> "pythonEnv = python3.withPackages (project.renderers.withPackages { python = python3; });" n
"in" n
"pkgs.mkShellNoCC {" n
> "packages = [pythonEnv];" n
> "shellHook = ''" n
> "export PYTHONPATH=$(readlink -f " (p "./") "):$PYTHONPATH" n
> "export PYTHONPATH=$(readlink -f " (p "./.") "):$PYTHONPATH" n
> "export MPLBACKEND=" (p "TkAgg") n
> "'';"n
> "}")
"}")
(sal > "pkgs.fetchFromGitHub {" n
> "owner = \"pixelifytica\";" n