devshell: add black, mypy and corresponding python-lsp-server plugins
continuous-integration/drone/push Build is failing Details

pull/93/head
Alexander 2024-02-12 19:58:24 +04:00
parent d0eee319d3
commit b4fe79fdce
1 changed files with 22 additions and 10 deletions

View File

@ -7,8 +7,9 @@
let let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
selfprivacy-graphql-api = pkgs.callPackage ./default.nix {
pythonPackages = pkgs.python310Packages; pythonPackages = pkgs.python310Packages;
selfprivacy-graphql-api = pkgs.callPackage ./default.nix {
inherit pythonPackages;
rev = self.shortRev or self.dirtyShortRev or "dirty"; rev = self.shortRev or self.dirtyShortRev or "dirty";
}; };
python = self.packages.${system}.default.pythonModule; python = self.packages.${system}.default.pythonModule;
@ -71,15 +72,26 @@
import ./nixos/module.nix self.packages.${system}.default; import ./nixos/module.nix self.packages.${system}.default;
devShells.${system}.default = pkgs.mkShell { devShells.${system}.default = pkgs.mkShell {
name = "SP API dev shell"; name = "SP API dev shell";
packages = with pkgs; [ packages = with pythonPackages;
python-env [
black
mypy
pylsp-mypy
python-lsp-black
python-lsp-server
] ++
(with pkgs;
[
nixpkgs-fmt
rclone rclone
redis redis
restic restic
self.packages.${system}.pytest-vm self.packages.${system}.pytest-vm
# FIXME consider loading this explicitly only after ArchLinux issue is solved # FIXME consider loading this explicitly only after ArchLinux issue is solved
self.checks.x86_64-linux.default.driverInteractive self.checks.x86_64-linux.default.driverInteractive
]; # the target API application python environment
python-env
]);
shellHook = '' shellHook = ''
# envs set with export and as attributes are treated differently. # envs set with export and as attributes are treated differently.
# for example. printenv <Name> will not fetch the value of an attribute. # for example. printenv <Name> will not fetch the value of an attribute.