Skip to content

Commit

Permalink
nix: Better devShell definition
Browse files Browse the repository at this point in the history
Rather than installing the `pytest-lsp` plugin (and therefore
requiring a rebuild anytime the source code changes) we just put the
working directory on the `PYTHONPATH`

Also drop Python 3.7 from the matrix
  • Loading branch information
alcarney committed Aug 9, 2023
1 parent 8614d62 commit 853dc92
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/pytest-lsp/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
let
pkgs = import nixpkgs { inherit system; overlays = [ pytest-lsp-overlay ]; };
in
eachPythonVersion [ "37" "38" "39" "310" "311" ] (pyVersion:


let
pytest-lsp = pkgs."python${pyVersion}Packages".pytest-lsp.overridePythonAttrs (_: { doCheck = false; });
in

eachPythonVersion [ "38" "39" "310" "311" ] (pyVersion:
with pkgs; mkShell {
name = "py${pyVersion}";

shellHook = ''
export PYTHONPATH="./:$PYTHONPATH"
'';

packages = with pkgs."python${pyVersion}Packages"; [
pytest-lsp
pygls
pytest
pytest-asyncio
];
}
)
Expand Down

0 comments on commit 853dc92

Please sign in to comment.