-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
flake.nix
52 lines (48 loc) · 1.18 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
description = "A flake for getting started with Scala.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
nixpkgsForGraal.url = "github:nixos/nixpkgs?rev=1939434b4ae04cb855edec936573c778a9ddeab0";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
nixpkgsForGraal,
flake-utils,
}: let
supportedSystems = [
"aarch64-darwin"
"aarch64-linux"
"x86_64-linux"
"x86_64-darwin"
];
in
flake-utils.lib.eachSystem supportedSystems (
system: let
pkgs = import ./pkgs.nix nixpkgs nixpkgsForGraal system;
makeShell = p:
p.mkShell {
buildInputs = with p; [
ammonite
bloop
coursier
jdk
mill
sbt
scala-cli
scalafmt
];
};
in {
devShells = {
default = makeShell pkgs.default;
java21 = makeShell pkgs.pkgs21;
java17 = makeShell pkgs.pkgs17;
java11 = makeShell pkgs.pkgs11;
java8 = makeShell pkgs.pkgs8;
};
formatter = pkgs.default.alejandra;
}
);
}