Parses each completion with the shell it targets, and checks none of them
names a store path: postFixup generates them by running the binary, whose
$0 lands in the output, so it copies the binary somewhere called
scala-cli and puts that on PATH first. Nothing noticed if that regressed.
Assisted-by: Claude Code (Claude Opus 5)
The binary generates fish completions too, alongside the bash and zsh ones
already installed here; it accepts no other shell.
Assisted-by: Claude Code (Claude Opus 5)
Taking scala-cli as a function argument meant
scala-cli.overrideAttrs (...).tests.version built and passed against the
unmodified top-level package, so the test could never fail for an
override.
Assisted-by: Claude Code (Claude Opus 5)
The wrapper referenced no jre at all: propagatedBuildInputs put one in the
closure but on nobody PATH, so the client found a java only if the user
happened to have one, and overriding jre changed nothing at run time.
Now that the wrapper carries it, the propagation is redundant and was
pushing the jre into the build environment of every dependent. Dropping
it does mean bloop no longer puts a java on the PATH of anything that
takes it as an input, `nix-shell -p bloop` included; add a jre alongside
it if you relied on that.
Assisted-by: Claude Code (Claude Opus 5)
Replaces the script with the one bloop grew, which is the same script:
shellcheck runs over it at build time, it refuses to downgrade, it fails
loudly when the release stops shipping an asset it needs, it writes
sources.json through a temporary file, and it supports the `commit`
updateScript feature.
Like bloop's it takes no arguments. The repository moves into sources.json
so that the release URL is written down once, and the sections of assets
to refresh are read from the file rather than passed in, which is what
lets one script serve this package and bloop, whose sources.json also has
a completions section.
Assisted-by: Claude Code (Claude Opus 5)
Asks GitHub for the latest release, prefetches every asset sources.json
lists and rewrites the file, so that r-ryantm can bump this package the
way it already bumps scala-cli.
The script takes no arguments and knows nothing about bloop: the
repository, the current version and even which sections of assets exist
are read out of sources.json, which is found through meta.position of
$UPDATE_NIX_ATTR_PATH. writeShellApplication runs shellcheck over it at
build time.
It supports the `commit` updateScript feature:
nix-shell maintainers/scripts/update.nix --argstr package bloop --arg commit true
Assisted-by: Claude Code (Claude Opus 5)
Gives nix-build -A metals.tests.version and nixpkgs-review something to
run, the way giter8, scalafmt and scala-cli already have. The defaults
are right here: the command is `metals --version` via mainProgram, and
the version is the one in this file.
Assisted-by: Claude Code (Claude Opus 5)
Nothing ran either wrapper, so a classpath or main-class mistake would
only have surfaced when someone started an editor.
testers.testVersion covers metals alone, since it runs meta.mainProgram,
so metals-mcp needs the install check to be exercised at all.
`metals --version` reaches repo1.maven.org to list the Scala versions it
supports. It tolerates being offline -- the version line still prints and
the exit code stays 0 -- which is what makes it usable in the sandbox,
and this check is what will catch it if that stops being true.
Assisted-by: Claude Code (Claude Opus 5)
Its main class is class-file 61, so on an older jre it dies with
UnsupportedClassVersionError at run time. The minimum of 11 in the metals
docs is the floor for the jdk it indexes and builds against, which
metals.javaHome still selects independently of this.
Assisted-by: Claude Code (Claude Opus 5)
metals runs on the packaged jre but handed its children nothing, so the
build server and everything else it spawns picked up whatever jdk the
shell had - which made overriding jre look like it did nothing.
metals.javaHome still selects the jdk metals indexes and builds against.
Assisted-by: Claude Code (Claude Opus 5)
The same script scalafmt and giter8 use, which needs no adjusting: it
reads the file to rewrite from meta.position and the GitHub repository
from meta.changelog, both of which this package now has.
Assisted-by: Claude Code (Claude Opus 5)
meta.platforms was absent rather than wrong, and check-meta only applies
the platform check when the attribute exists, so giter8 was offered on
every system including those with no jre.
Assisted-by: Claude Code (Claude Opus 5)
Applies the same rework as scalafmt, whose copy of this script it was:
package.nix is restored unless the whole run succeeds, downgrades and
implausible tags are refused, $UPDATE_NIX_ATTR_PATH is honoured, logging
goes to stderr and the `commit` updateScript feature is supported, with
shellcheck running over it at build time.
The two scripts are identical apart from the attribute path each falls
back to when run by hand.
Assisted-by: Claude Code (Claude Opus 5)