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,26 +3,29 @@
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,
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; nixpkgs,
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { }: let
pkgs = import nixpkgs { inherit system; }; supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
}); forEachSupportedSystem = f:
in nixpkgs.lib.genAttrs supportedSystems (system:
{ f {
devShells = forEachSupportedSystem ({ pkgs }: { pkgs = import nixpkgs {inherit system;};
default = pkgs.mkShell { });
packages = with pkgs; [ in {
cachix devShells = forEachSupportedSystem ({pkgs}: {
lorri default = pkgs.mkShell {
niv packages = with pkgs; [
nixfmt-classic cachix
statix lorri
vulnix niv
haskellPackages.dhall-nix alejandra
]; statix
}; vulnix
}); haskellPackages.dhall-nix
}; ];
};
});
};
} }

View file

@ -3,23 +3,28 @@
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,
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; nixpkgs,
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { }: let
pkgs = import nixpkgs { inherit system; }; supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
}); forEachSupportedSystem = f:
in nixpkgs.lib.genAttrs supportedSystems (system:
{ f {
devShells = forEachSupportedSystem ({ pkgs }: { pkgs = import nixpkgs {inherit system;};
default = pkgs.mkShell { });
venvDir = "venv"; in {
packages = with pkgs; [ python311 ] ++ devShells = forEachSupportedSystem ({pkgs}: {
(with pkgs.python311Packages; [ default = pkgs.mkShell {
pip venvDir = "venv";
venvShellHook packages = with pkgs;
]); [python311]
}; ++ (with pkgs.python311Packages; [
}); pip
}; venvShellHook
python-lsp-server
]);
};
});
};
} }