add shell for java

This commit is contained in:
Adithya 2024-01-12 19:06:30 +05:30
parent 871c1d944c
commit 7f90a00482
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
3 changed files with 21 additions and 2 deletions

View file

@ -82,7 +82,8 @@ use flake github:adtya/devshell#rust
#### What's included? #### What's included?
- [nodejs](https://nodejs.org) - [nodejs](https://nodejs.org)
- [yarn](https://yarnpkg.com) - [yarn](https://yarnpkg.com)
#### Activatge with Nix
#### Activate with Nix
```sh ```sh
$ nix develop github:adtya/devshell#node $ nix develop github:adtya/devshell#node
``` ```
@ -91,4 +92,18 @@ $ nix develop github:adtya/devshell#node
```sh ```sh
use flake github:adtya/devshell#node 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
```

View file

@ -24,9 +24,10 @@
devShells = { devShells = {
go = import ./shells/go.nix { inherit pkgs; }; go = import ./shells/go.nix { inherit pkgs; };
haskell = import ./shells/haskell.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; }; python = import ./shells/python.nix { inherit pkgs; };
rust = import ./shells/rust.nix { inherit pkgs; }; rust = import ./shells/rust.nix { inherit pkgs; };
node = import ./shells/node.nix { inherit pkgs; };
}; };
} }
); );

3
shells/java.nix Normal file
View file

@ -0,0 +1,3 @@
{ pkgs }: pkgs.mkShell {
packages = with pkgs; [ openjdk20 gradle_8 java-language-server ];
}