Skip to content

Commit

Permalink
Mention nix develop in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
neko-kai committed Jan 14, 2025
1 parent 60d277d commit 0bff81b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ Likewise with Scala 3:

In Intellij, you may also set Scala version by changing the option `sbt -> sbt settings -> Open cross-compiled projects Scala 3 / Scala 2 projects as:`

Provided `flake.nix` can be used to set up the external dependencies necessary to build the project, such as sbt, JDK, coursier, etc:

```bash
nix develop
```

<!--- docs:start --->

# Talks
Expand Down
3 changes: 2 additions & 1 deletion devops/.env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ export SCALA212=$(cat project/Deps.sc | grep 'val scala212 ' | sed -r 's/.*\"(.
export SCALA213=$(cat project/Deps.sc | grep 'val scala213 ' | sed -r 's/.*\"(.*)\".**/\1/')
export SCALA3=$(cat project/Deps.sc | grep 'val scala300 ' | sed -r 's/.*\"(.*)\".**/\1/')

[[ -z "$SCALA_VERSION" ]] && echo "Missing SCALA_VERSION" && exit 1
[[ -z "${SCALA_VERSION:-}" ]] && echo "Missing SCALA_VERSION. Define SCALA_VERSION" && exit 1
[[ -z "${JAVA_VERSION:-}" ]] && echo "Missing JAVA_VERSION. Define JAVA_VERSION" && exit 1

case $SCALA_VERSION in
2.11) SCALA_VERSION="$SCALA211" ;;
Expand Down
5 changes: 3 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@
export JDK21=${pkgs.jdk21_headless}
export JDK_DEV=${pkgs.graalvm-ce}
rm -f ./.env || true
rm ./.env/jdk || true
rmdir ./.env || true
mkdir -p ./.env
ln -s ''${JDK_DEV} ./.env/jdk
ln -s ''${JDK_DEV} ./.env/jdk || true
'';
};
}
Expand Down

0 comments on commit 0bff81b

Please sign in to comment.