Skip to content

Commit

Permalink
nix: Add packages
Browse files Browse the repository at this point in the history
This enables you to build `pytest-lsp` with `nix build ...`.

However... this produces a `site-packages` install of `pytest-lsp` so
I'm not entirely sure how useful this is...
  • Loading branch information
alcarney committed Jan 7, 2024
1 parent d50d7d8 commit c4211b9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 23 deletions.
1 change: 1 addition & 0 deletions lib/pytest-lsp/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.coverage
result
55 changes: 32 additions & 23 deletions lib/pytest-lsp/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,36 @@
pytest-lsp-overlay = import ./nix/pytest-lsp-overlay.nix;
in {

overlays.default = pytest-lsp-overlay;

devShells = utils.lib.eachDefaultSystemMap (system:
let
pkgs = import nixpkgs { inherit system; overlays = [ pytest-lsp-overlay ]; };
in
eachPythonVersion [ "38" "39" "310" "311" ] (pyVersion:
with pkgs; mkShell {
name = "py${pyVersion}";

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

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

packages = utils.lib.eachDefaultSystemMap (system:
let
pkgs = import nixpkgs { inherit system; overlays = [ pytest-lsp-overlay ]; };
in
eachPythonVersion [ "38" "39" "310" "311"] (pyVersion:
pkgs."python${pyVersion}Packages".pytest-lsp
)
);

devShells = utils.lib.eachDefaultSystemMap (system:
let
pkgs = import nixpkgs { inherit system; overlays = [ pytest-lsp-overlay ]; };
in
eachPythonVersion [ "38" "39" "310" "311" ] (pyVersion:
with pkgs; mkShell {
name = "py${pyVersion}";

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

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

0 comments on commit c4211b9

Please sign in to comment.