Add servers for languages

This commit is contained in:
Lillian Violet 2024-04-27 15:02:27 +02:00
parent 69b4904bb6
commit 371809eea9
3 changed files with 50 additions and 41 deletions

View file

@ -21,6 +21,7 @@
[python311 virtualenv] [python311 virtualenv]
++ (with pkgs.python311Packages; [ ++ (with pkgs.python311Packages; [
pip pip
python-lsp-server
venvShellHook venvShellHook
requests requests
jupyter jupyter

View file

@ -3,21 +3,24 @@
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz"; inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
outputs = { self, nixpkgs }: outputs = {
let self,
nixpkgs,
}: let
supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"]; supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { forEachSupportedSystem = f:
nixpkgs.lib.genAttrs supportedSystems (system:
f {
pkgs = import nixpkgs {inherit system;}; pkgs = import nixpkgs {inherit system;};
}); });
in in {
{
devShells = forEachSupportedSystem ({pkgs}: { devShells = forEachSupportedSystem ({pkgs}: {
default = pkgs.mkShell { default = pkgs.mkShell {
packages = with pkgs; [ packages = with pkgs; [
cachix cachix
lorri lorri
niv niv
nixfmt-classic alejandra
statix statix
vulnix vulnix
haskellPackages.dhall-nix haskellPackages.dhall-nix

View file

@ -3,21 +3,26 @@
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz"; inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
outputs = { self, nixpkgs }: outputs = {
let self,
nixpkgs,
}: let
supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"]; supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { forEachSupportedSystem = f:
nixpkgs.lib.genAttrs supportedSystems (system:
f {
pkgs = import nixpkgs {inherit system;}; pkgs = import nixpkgs {inherit system;};
}); });
in in {
{
devShells = forEachSupportedSystem ({pkgs}: { devShells = forEachSupportedSystem ({pkgs}: {
default = pkgs.mkShell { default = pkgs.mkShell {
venvDir = "venv"; venvDir = "venv";
packages = with pkgs; [ python311 ] ++ packages = with pkgs;
(with pkgs.python311Packages; [ [python311]
++ (with pkgs.python311Packages; [
pip pip
venvShellHook venvShellHook
python-lsp-server
]); ]);
}; };
}); });