Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,4 @@ PS

Most Scala devs either use [Intellij IDEA](https://www.jetbrains.com/help/idea/discover-intellij-idea-for-scala.html) or the editors supported by [Metals](https://scalameta.org/metals/) - a Scala language server.

This flake was tested in WSL 2 on Ubuntu-20.04 LTS, but it should work on Macs as well. M1 users might need to install Rosetta 2 because some packages are not available yet:
```bash
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
```
I don't have a Mac, but I will set up CI eventually to test on them. Please report issues until then. Thank you!
This flake was tested in WSL 2 on Ubuntu-20.04 LTS, but it should work on Macs as well. I don't have a Mac, but I will set up CI eventually to test on them. Please report issues until then. Thank you!
7 changes: 3 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
description = "A flake for getting started with Scala.";

inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixpkgs-unstable;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

about URL syntax without quotes: NixOS/rfcs#45

flake-utils.url = github:numtide/flake-utils;
nixpkgs.url = "github:nixos/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = {
Expand Down
19 changes: 9 additions & 10 deletions pkgs.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
nixpkgs: system: let
makeOverlays = java: {
makeOverlays = java: let
millOverlay = final: prev: {
jre = prev.${java};

mill = prev.mill.override {
jre = final.jre;
};
Expand All @@ -14,21 +12,22 @@ nixpkgs: system: let
};

scalaCliOverlay = final: prev: {
# hardcoded because the scala-cli requires 17 or above
jre = prev.${"graalvm17-ce"};

scala-cli = prev.scala-cli.override {
jre = final.jre;
# hardcoded because scala-cli requires 17 or above
jre = final.graalvm17-ce;
};
};
};
in [
javaOverlay
scalaCliOverlay
millOverlay
];

makePackages = java: let
overlays = makeOverlays java;
in
import nixpkgs {
inherit system;
overlays = builtins.attrValues overlays;
inherit system overlays;
};

default = pkgs17;
Expand Down