nix-dev-envs/flake.nix

136 lines
3 KiB
Nix
Raw Normal View History

2024-08-17 23:46:08 -07:00
{
description = "Flake for various development environments.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-08-17 23:46:08 -07:00
};
outputs =
{
nixpkgs,
flake-utils,
fenix,
...
}:
2024-08-17 23:46:08 -07:00
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
rustPkgs = fenix.packages.${system};
in
{
formatter = pkgs.nixfmt-rfc-style;
2024-08-17 23:46:08 -07:00
devShells = {
go = pkgs.mkShell {
buildInputs = with pkgs; [
go
2024-08-17 23:59:50 -07:00
gopls
2024-08-17 23:46:08 -07:00
];
};
zig = pkgs.mkShell {
buildInputs = with pkgs; [
zig
2024-08-17 23:59:50 -07:00
zls
2024-08-17 23:46:08 -07:00
];
};
pythonPoetry = pkgs.mkShell {
buildInputs = with pkgs; [
poetry
2024-08-17 23:59:50 -07:00
pyright
2024-08-17 23:46:08 -07:00
];
};
haskellStack = pkgs.mkShell {
buildInputs = with pkgs; [
haskellPackages.stack
2024-08-17 23:59:50 -07:00
haskell-language-server
2024-08-17 23:46:08 -07:00
];
};
haskellCabal = pkgs.mkShell {
buildInputs = with pkgs; [
haskellPackages.cabal-install
ghc
2024-08-17 23:59:50 -07:00
haskell-language-server
2024-08-17 23:46:08 -07:00
];
};
rustBeta = pkgs.mkShell {
buildInputs = [
rustPkgs.beta.completeToolchain
2024-08-17 23:46:08 -07:00
];
};
rustNightly = pkgs.mkShell {
buildInputs = [
rustPkgs.complete.toolchain
2024-08-17 23:46:08 -07:00
];
};
rustStable = pkgs.mkShell {
buildInputs = [
rustPkgs.stable.completeToolchain
2024-08-17 23:46:08 -07:00
];
};
npmNode = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs
nodePackages_latest.npm
nodePackages_latest.prettier
2024-08-17 23:59:50 -07:00
typescript-language-server
2024-08-17 23:46:08 -07:00
];
};
pnpmNode = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs
nodePackages_latest.pnpm
nodePackages_latest.prettier
2024-08-17 23:59:50 -07:00
typescript-language-server
2024-08-17 23:46:08 -07:00
];
};
yarnNode = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs
nodePackages_latest.yarn
nodePackages_latest.prettier
2024-08-17 23:59:50 -07:00
typescript-language-server
2024-08-17 23:46:08 -07:00
];
};
typst = pkgs.mkShell {
buildInputs = with pkgs; [
typst
typstfmt
tinymist
];
};
latexFull = pkgs.mkShell {
buildInputs = with pkgs; [
texliveFull
2024-08-17 23:59:50 -07:00
texlab
2024-08-17 23:46:08 -07:00
];
};
latexMinimal = pkgs.mkShell {
buildInputs = with pkgs; [
texliveMinimal
2024-08-17 23:59:50 -07:00
texlab
2024-08-17 23:46:08 -07:00
];
};
};
}
);
}