The TruffleRuby derivation relied entirely on the meta defaults supplied by buildGraalvmProduct, which are written for GraalJS. As a result the package advertised the generic GraalVM homepage, a description of "High-Performance Polyglot VM (Product: truffleruby)", the GraalVM umbrella license set, and, most visibly, mainProgram = "js" -- so nix run and similar tooling pointed at a binary the package does not even install.
Override those attributes with values that describe TruffleRuby itself. The license list is the upstream one from LICENCE.md rather than the GraalVM set, since TruffleRuby is offered under any one of EPL 2.0, GPL 2.0 only, or LGPL 2.1 only. The remaining inherited attributes (platforms, sourceProvenance, and teams) are still correct and are deliberately left to flow through from graalvm-ce.
Also add nirvdrum as a maintainer. This is additive alongside the inherited GraalVM CE team, which continues to be notified of changes.
Upstream stopped tagging jdk-* after 25.0.2; JDK updates now ship inside
the graal-* releases. version therefore tracks the GraalVM version, not
the JDK version: graal-25.2.4 contains jdk 25.0.4.
Assisted-by: Claude Code (claude-opus-5)
this was done manually, fixing the eval and any remaining stuff of the previous commit
together with the previous commit this shouldn't create any rebuilds
this creates some eval errors that will be fixed in the next commit
done with the following script:
```fish
\#!/usr/bin/env fish
set packagesjson (nix eval --impure --json --expr '
let
lib = import ./lib;
in
import pkgs/servers/x11/xorg/default.nix (lib.mapAttrs (
name: _:
if name == "lib" then
lib
else if name == "config" then
{ allowAliases = false; }
else
name
) (__functionArgs (import pkgs/servers/x11/xorg/default.nix))) { }
' | jq)
set one (grep '^ [A-Za-z0-9_-]*$' pkgs/servers/x11/xorg/default.nix | string trim | string replace -r '$' Z | sort | string sub -e -1)
set two (grep '^ [A-Za-z0-9_-]* = [A-Za-z0-9_-]*;$' pkgs/servers/x11/xorg/default.nix | cut -d= -f1 | string trim | string replace -r '$' Z | sort | string sub -e -1)
for arg in $one $two
set oname $arg
set nname (echo $packagesjson | jq -r .$oname)
if test $nname = null
echo (set_color red)warn:(set_color normal) unknown package xorg.$oname >&2
continue
end
echo $oname "->" $nname
# replace basic xorg.$name references
for file in (rg -F "xorg.$oname" --files-with-matches pkgs)
# special cases
sd -F "$oname = xorg.$oname;" "$nname = $nname;" $file
# replace
sd -F "xorg.$oname" "$nname" $file
# fixup function arguments
# prevent duplicate function args
if grep -E " ($oname|$nname),\$" $file >/dev/null
continue
end
if grep 'xorg\..' $file >/dev/null # case1: there is more so we can't just remove the function arg
if grep ' xorg,$' $file >/dev/null
sd ' xorg,$' " xorg,
$nname," $file
else if grep ' xorg ? .*,$' $file >/dev/null
sd 'xorg( ? .*),$' "xorg\$1,
$nname," $file
else
sd -F 'xorg,' "$nname,
xorg," $file
end
else # case there is no more xorg..* so we can just replace the function arg
sd 'xorg(| ? .*),.*$' "$nname," $file
end
end
end
nix fmt
```
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.
Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
On Darwin, it is apparently Oracle's intention to be hostile towards
builds of Clang which are not by Apple.
see https://github.com/oracle/graal/issues/12041
If you want native-image to both work on Darwin and use the nix-provided CC
then you must pass it the flags to disable toolchain checking entirely.
Since the flags are mandatory for functionality,
they should be part of the wrapper.
Update graalvm-oracle_25-ea-36 to graalvm-oracle_25 (General Availability),
currently the latest version available at:
https://www.graalvm.org/downloads/
The GPL-2.0-with-classpath-exception is deprecated in spdx and the exception Classpath-exception-2.0 should be used instead.
Other Classpath license hace also benn replaced with it.