Initialize nix setup for the repo#880
Merged
Merged
Conversation
The default devshell only had jdk11, nixfmt, and sbt, which is not enough to drive buildTools/test, the docs site, the Docker image, or the CI matrix. Add the external tools used by the build (bazelisk, coursier, docker, git, gradle, jq, maven, mill, nodejs, yarn), all pinned to the shell's JDK where applicable. Factor the shell into mkDevShell parameterized by a JDK and expose: - default (JDK 11, the release/build target) - jdk17, jdk21 (CI matrix targets)
Remove dependabot.yml since the github-actions and docker ecosystems it managed are already covered by Renovate's default managers, which would have produced duplicate PRs. Switch the Renovate preset from sourcegraph/renovate-config to the upstream config:recommended preset, since the Sourcegraph preset is tailored for Sourcegraph's own repos (internal packages, team reviewers, etc.) and not relevant here.
- docker-setup.sh: install coursier as `cs` (with `coursier` symlink)
so the docker image exposes the `cs` binary expected by the build.
- flake.nix: add an explicit `jdk11` devShell so workflows can use
`.#jdk${matrix.java}` uniformly.
- Replace actions/setup-java + sbt/setup-sbt + gradle/setup-gradle +
coursier/setup-action + yarn-installed bazelisk with
DeterminateSystems/nix-installer-action + magic-nix-cache-action, and
run all sbt/mvn/bazelisk/cs invocations via `nix develop`.
- BazelBuildTool: detect bazelisk/bazel on PATH at runtime and prefer
bazelisk (so it respects the project's .bazelversion).
The .github/labeler.yml config file was removed earlier in this branch, so the issue-labeler workflow can no longer find its configuration.
Adds three new `nix flake check` entries: - shellcheck on bin/*.sh - actionlint on .github/workflows/*.yml (which itself runs shellcheck against `run:` script bodies) - scalafmt --check across the whole project source tree (a writable copy is made and `git init` ed so that `.scalafmt.conf`'s `project.git = true` works) To unblock the new checks, fix the existing shellcheck findings in bin/*.sh and ci.yml: quote variables, drop a dead `ARGS=$@` line, and add a couple of in-line `# shellcheck disable=SC2016` directives where we intentionally use single quotes to defer expansion to the inner shell.
Adds a fixed-output derivation that runs `coursier bootstrap` against a pinned scip-java version from Maven Central, plus a thin wrapper that adds a Nix-provided JDK to PATH. Exposed as: nix build .#scip-java nix run .#scip-java -- index ... Bump `scipJavaVersion` and re-run `nix build` to get the new outputHash to commit.
This config was never wired up to any workflow; releases use GitHub's native auto-generated notes instead.
- Remove scip-java packages and apps outputs (we don't have a way to build from source in Nix without nontrivial sbt-derivation setup, and the published-artifact fetch wasn't pulling its weight) - Drop unused 'lib' binding - Remove redundant HOME=$(mktemp -d) from scalafmt check (nixpkgs scalafmt bundles its JARs and doesn't need a writable HOME)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.