Nix flake for Datalevin. Builds both the JVM uberjar and the GraalVM native binary (dtlv) using clj-nix.
# Build the native binary (default)
nix build github:noblepayne/datalevin-flake
# Build just the JVM uberjar
nix build github:noblepayne/datalevin-flake#clj-bin
# Build the patched uberjar
nix build github:noblepayne/datalevin-flake#uberjar
# Run directly
nix run github:noblepayne/datalevin-flake
# Dev shell with JDK, Clojure, Leiningen, and GraalVM
nix develop github:noblepayne/datalevin-flake
# Run all checks
nix flake check| Attribute | Description |
|---|---|
packages.dtlv |
GraalVM native binary |
packages.clj-bin |
JVM uberjar with wrapper script |
packages.uberjar |
JVM uberjar only |
devShells.default |
Development shell (JDK, Clojure, Leiningen, GraalVM) |
checks.* |
Build validation tests |
- Source is fetched from
github:datalevin/datalevin. deps-lock.jsonis injected for offline Maven dependency resolution.deps.ednis patched to includeresources/on the classpath. This ensures GraalVM native-image metadata ends up in the uberjar.- TODO: change upstream?
clj-nixbuilds the uberjar viamkCljApp.- The uberjar's
reachability-metadata.jsonis patched withjqto work around a GraalVM 25.0.1 assertion bug (settingunsafeAllocatedfromtruetofalse). buildGraalvmNativeImagecompiles the patched jar into thedtlvnative binary.
EPL-2.0