fix devshell: Strawberry CLI dependencies

This commit is contained in:
Alexander Tomokhov 2024-02-13 01:47:58 +04:00
parent b4fe79fdce
commit ad6514658d

View file

@ -7,9 +7,8 @@
let let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
pythonPackages = pkgs.python310Packages;
selfprivacy-graphql-api = pkgs.callPackage ./default.nix { selfprivacy-graphql-api = pkgs.callPackage ./default.nix {
inherit pythonPackages; pythonPackages = pkgs.python310Packages;
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;
@ -20,7 +19,14 @@
pytest pytest
pytest-datadir pytest-datadir
pytest-mock pytest-mock
])); black
mypy
pylsp-mypy
python-lsp-black
python-lsp-server
typer # for strawberry
] ++ strawberry-graphql.optional-dependencies.cli));
vmtest-src-dir = "/root/source"; vmtest-src-dir = "/root/source";
shellMOTD = '' shellMOTD = ''
Welcome to SP API development shell! Welcome to SP API development shell!
@ -72,26 +78,17 @@
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 pythonPackages; packages = with pkgs; [
[ nixpkgs-fmt
black rclone
mypy redis
pylsp-mypy restic
python-lsp-black self.packages.${system}.pytest-vm
python-lsp-server # FIXME consider loading this explicitly only after ArchLinux issue is solved
] ++ self.checks.x86_64-linux.default.driverInteractive
(with pkgs; # the target API application python environment
[ python-env
nixpkgs-fmt ];
rclone
redis
restic
self.packages.${system}.pytest-vm
# FIXME consider loading this explicitly only after ArchLinux issue is solved
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.