hanchu/devenv.nix

81 lines
1.7 KiB
Nix
Raw Normal View History

2024-10-20 10:45:48 +00:00
{
pkgs,
lib,
config,
inputs,
...
2024-10-22 08:18:06 +00:00
}: let
nsrc = pkgs.fetchFromGitHub {
owner = "elm-tooling";
repo = "elm-language-server";
rev = "0dc4076180fe7e758bed267a84911cc202011a13";
sha256 = "1xys9a468fy1vxlby8pmvnpv0kg5hr4956mdp2kclvs55k4j9y43";
};
elm-lsp =
lib.overrideDerivation pkgs.elmPackages.elm-language-server
(drv: {
src = nsrc;
});
in {
2024-10-20 10:45:48 +00:00
# https://devenv.sh/basics/
env.GREET = "devenv";
# https://devenv.sh/packages/
packages = with pkgs; [
sqlite
2024-10-20 12:51:30 +00:00
nodePackages.typescript-language-server
nodePackages.prettier
2024-10-22 08:18:06 +00:00
elm2nix
elmPackages.elm
elmPackages.elm-format
elmPackages.elm-review
elmPackages.elm-test-rs
elmPackages.elm-land
elm-lsp
# elmPackages.lamdera # lol
2024-10-20 10:45:48 +00:00
];
# https://devenv.sh/languages/
# languages.rust.enable = true;
languages = {
2024-10-22 08:18:06 +00:00
# elm.enable = true;
2024-10-20 12:51:30 +00:00
javascript = {
enable = true;
bun.enable = true;
};
2024-10-20 10:45:48 +00:00
};
# https://devenv.sh/processes/
# processes.cargo-watch.exec = "cargo-watch";
# https://devenv.sh/services/
# services.postgres.enable = true;
# https://devenv.sh/scripts/
scripts.hello.exec = ''
echo hello from $GREET
'';
enterShell = ''
hello
git --version
'';
# https://devenv.sh/tasks/
# tasks = {
# "myproj:setup".exec = "mytool build";
# "devenv:enterShell".after = [ "myproj:setup" ];
# };
# https://devenv.sh/tests/
enterTest = ''
echo "Running tests"
git --version | grep --color=auto "${pkgs.git.version}"
'';
# https://devenv.sh/pre-commit-hooks/
# pre-commit.hooks.shellcheck.enable = true;
# See full reference at https://devenv.sh/reference/options/
}