nix-dev-envs/flake.nix

130 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";
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs = {
nixpkgs,
flake-utils,
rust-overlay,
...
}:
flake-utils.lib.eachDefaultSystem (
system: let
overlays = [(import rust-overlay)];
pkgs = import nixpkgs {
inherit system overlays;
};
in {
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 = with pkgs; [
rust-bin.beta.latest.default
];
};
rustNightly = pkgs.mkShell {
buildInputs = with pkgs; [
rust-bin.nightly.latest.default
];
};
rustStable = pkgs.mkShell {
buildInputs = with pkgs; [
rust-bin.stable.latest.default
];
};
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
];
};
};
}
);
}