papermc-plugin/devenv.nix

36 lines
786 B
Nix

{ pkgs, ... }:
{
# https://devenv.sh/basics/
env.NAME = "$REPO_NAME";
# https://devenv.sh/packages/
packages = with pkgs;[
git
];
# https://devenv.sh/scripts/
scripts.welcome-banner.exec = ''
echo "Welcome to the $NAME development environment."
echo "Java version: $(java --version | head -n 1 | cut -d ' ' -f 2)"
'';
enterShell = "welcome-banner";
# https://devenv.sh/languages/
languages.java = {
enable = true;
gradle.enable = true;
jdk.package = pkgs.jdk17;
};
languages.kotlin.enable = true;
# https://devenv.sh/pre-commit-hooks/
# pre-commit.hooks.shellcheck.enable = true;
# https://devenv.sh/processes/
# processes.ping.exec = "ping example.com";
# See full reference at https://devenv.sh/reference/options/
}