Update pythonshell, remove poetryshell template

This commit is contained in:
Evie Litherland-Smith 2024-07-10 06:23:16 +01:00
parent 4c104e8315
commit 1842b75a75

View file

@ -171,33 +171,18 @@ nix-mode
(p (completing-read "Platform: " '("all" "allBut" "arm" "cygwin" "darwin" "freebsd" "gnu" "i686" "illumos" "linux" "mesaPlatforms" "mips" "netbsd" "none" "openbsd" "unix" "x86"))) ";" n> q "};" n> "}" (p (completing-read "Platform: " '("all" "allBut" "arm" "cygwin" "darwin" "freebsd" "gnu" "i686" "illumos" "linux" "mesaPlatforms" "mips" "netbsd" "none" "openbsd" "unix" "x86"))) ";" n> q "};" n> "}"
) )
(pythonshell "let" n (pythonshell "let" n
> "pkgs = import " (p "<nixpkgs>") " {};" n > "pkgs = import " (p "<nixpkgs>") " {};" n
> "in pkgs.mkShellNoCC {" n > "in pkgs.mkShellNoCC {" n
> "packages = [" n > "packages = with pkgs; [" n
> "(pkgs." (p "python3") ".withPackages" n > "poetry" n
> "(ps: with ps; ["(p "mypy") "]))" n > (p "python3") n
> q n > q n
> "];" n > "];" n
> "shellHook = ''" n
> "export LD_LIBRARY_PATH=${pkgs.stdenv.cc.cc.lib}/lib" n
> "'';" n
> "}") > "}")
(poetryshell "# See https://github.com/nix-community/poetry2nix/blob/master/docs/edgecases.md#cases" n
"# for edgecases like setuptools not found" n
"let" n
> "pkgs = import " (p "<nixpkgs>") " {};" n
> "poetry2nix = (builtins.getFlake \"github:nix-community/poetry2nix\").lib.mkPoetry2Nix {inherit pkgs;};" n
> "poetryEnv = let " n
> "projectDir = " (p "./.") ";" n
> "in (poetry2nix.mkPoetryEnv {" n
> "inherit projectDir;" n
> "overrides = poetry2nix.defaultPoetryOverrides;" n
> "python = " (p "pkgs.python3") ";" n
> "editablePackageSources = {" (p "package") "= projectDir;};" n
> "extraPackages = (ps: [" q "]);" n
> "preferWheels = true;" n
> "groups = [\"dev\"];" n
> "extras = [\"*\"];" n
> "});" n
"in" n
> "poetryEnv.env")
(poetryoverride "overrides = poetry2nix.defaultPoetryOverrides.extend" n (poetryoverride "overrides = poetry2nix.defaultPoetryOverrides.extend" n
> "(self: super: {" n > "(self: super: {" n
> (s package) " =" n > (s package) " =" n