Skip to content

Commit fe6390a

Browse files
authored
nix: use dev-tools (#1003)
1 parent 30d16b1 commit fe6390a

File tree

2 files changed

+25
-46
lines changed

2 files changed

+25
-46
lines changed

flake.lock

Lines changed: 20 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 5 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,9 @@
11
{
2-
description = "Scala development shell";
2+
description = "ProfunKtor - Scala development tools";
33

4-
inputs = {
5-
nixpkgs.url = "nixpkgs/nixos-unstable";
6-
flake-utils.url = github:numtide/flake-utils;
7-
};
8-
9-
outputs = { nixpkgs, flake-utils, ... }:
10-
flake-utils.lib.eachDefaultSystem (system:
11-
let
12-
overlays = [
13-
(self: super: {
14-
jre = super.jdk21_headless;
15-
sbt = super.sbt.overrideAttrs (
16-
old: {
17-
nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ super.makeWrapper ];
18-
# Setting SBT_OPTS because of this bug: https://github.com/sbt/sbt-site/issues/169
19-
postInstall = ''
20-
wrapProgram $out/bin/sbt --suffix SBT_OPTS : '--add-opens java.base/java.lang=ALL-UNNAMED'
21-
'';
22-
}
23-
);
24-
})
25-
];
26-
pkgs = import nixpkgs { inherit system overlays; };
27-
in
28-
{
29-
devShell = pkgs.mkShell {
30-
name = "scala-dev-shell";
31-
32-
buildInputs = with pkgs; [
33-
gnupg
34-
jekyll
35-
jre
36-
sbt
37-
];
4+
inputs.dev-tools.url = github:profunktor/dev-tools;
385

39-
shellHook = ''
40-
JAVA_HOME="${pkgs.jre}"
41-
'';
42-
};
43-
44-
packages = {
45-
inherit (pkgs) sbt;
46-
};
47-
});
6+
outputs = { dev-tools, ... }: {
7+
inherit (dev-tools) devShells packages;
8+
};
489
}

0 commit comments

Comments
 (0)