From 7f90a00482a632b55fb9ca703a3fc60b8f85a35e Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Fri, 12 Jan 2024 19:06:30 +0530 Subject: [PATCH] add shell for java --- README.md | 17 ++++++++++++++++- flake.nix | 3 ++- shells/java.nix | 3 +++ 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 shells/java.nix diff --git a/README.md b/README.md index dcf21b6..71a824f 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,8 @@ use flake github:adtya/devshell#rust #### What's included? - [nodejs](https://nodejs.org) - [yarn](https://yarnpkg.com) -#### Activatge with Nix + +#### Activate with Nix ```sh $ nix develop github:adtya/devshell#node ``` @@ -91,4 +92,18 @@ $ nix develop github:adtya/devshell#node ```sh use flake github:adtya/devshell#node ``` +### Java +#### What's included? + - OpenJDK 20 + - gradle 8 + +#### Activate with Nix +```sh +$ nix develop github:adtya/devshell#java +``` + +#### Activate with Direnv +```sh +use flake github:adtya/devshell#java +``` diff --git a/flake.nix b/flake.nix index 4341729..ab8a04e 100644 --- a/flake.nix +++ b/flake.nix @@ -24,9 +24,10 @@ devShells = { go = import ./shells/go.nix { inherit pkgs; }; haskell = import ./shells/haskell.nix { inherit pkgs; }; + java = import ./shells/java.nix { inherit pkgs; }; + node = import ./shells/node.nix { inherit pkgs; }; python = import ./shells/python.nix { inherit pkgs; }; rust = import ./shells/rust.nix { inherit pkgs; }; - node = import ./shells/node.nix { inherit pkgs; }; }; } ); diff --git a/shells/java.nix b/shells/java.nix new file mode 100644 index 0000000..0a358ac --- /dev/null +++ b/shells/java.nix @@ -0,0 +1,3 @@ +{ pkgs }: pkgs.mkShell { + packages = with pkgs; [ openjdk20 gradle_8 java-language-server ]; +}