Repository navigation
iets is a re-implementation of the Nix client in Rust. It is mostly, but not
fully, compatible with Nix. This release follows v0.2.0 with more than 1150
commits.
The main changes:
- iets fetches Git inputs itself. It no longer runs the real
nixfor them. - Evaluation of a NixOS configuration is about 20 % faster.
- A hostile input, such as a Git server or an archive, can do less.
nix-eval-jobsworks on a flake that has a__functoroutput.
Download
To run it with Nix: nix run github:numtide/iets/v0.3.0
For Linux, a static musl binary can be downloaded like this:
curl -Lo iets https://github.com/numtide/iets/releases/download/v0.3.0/iets-0.3.0-x86_64-linux
chmod +x iets
./iets versionThe binary needs no /nix/store, no nix-daemon and no shared libraries.
For aarch64-linux, use iets-0.3.0-aarch64-linux. SHA256SUMS lists the
checksums.
Security
- iets no longer opens a local file when a server sends a
file://URL.
Before, a Git LFS server could make iets read a local file that way. - Reading a Git repository no longer runs the
core.fsmonitorprogram
that the config of the repository names. - The
.lfsconfigof a repository can no longer give an option tossh.
iets refuses a Git LFS ssh host that starts with-, as Git does since
CVE-2017-1000117. - A crafted archive can no longer use much more time or memory than its
size. iets limits the depth of the paths, counts hard links and each
compression layer towardfetch-max-size, and writes large files to
disk in parts. builtins.matchandbuiltins.splitstop with an error when a pattern
such as(a|a)*bbacktracks too much. Before, the evaluation did not
end in a practical time.- In pure evaluation, symbolic links are no longer followed if they lead
out of the project. - iets refuses a cache directory that is a symbolic link or that belongs
to another user. Before, that user could put files into your cache. - With a
grpc://builder (nix-grpc-store), the remote store now checks
the signature of each path that iets uploads. Before, a
builtins.fetchClosurepath from a binary cache could enter the remote
store without a trusted signature.
New
- iets fetches Git inputs itself, with the
gitprogram. Before, it ran
the realnixfor them. This includes remote repositories, submodules,
Git LFS files and the check of signed commits (verifyCommit). fetchTree:- support for zip archives
- support for sourcehut URLs
- support for forge inputs that have a
revbut nonarHash
- Support for
builtins.fetchClosure. ItstoPathattribute, which
rewrites an input-addressed path to a content-addressed one, is not
supported yet. importreads from a derivation output that is already in the store. The
ifd-local-outputlint reports it, and the IFD settings apply.iets eval-jobsprints each job as soon as it is evaluated. Before, it
waited for 256 jobs.iets buildtakes-jand--cores, applies the daemon settings, sends
timeoutandmax-silent-timeto a gRPC builder, and builds a derivation
only for the outputs that are necessary.- Classic mode:
nix-fallback = auto,alwaysorneverchooses when the
realnixruns. Each setting is also a flag. - A second
nix-buildof the same input skips the evaluation when no file
changed. --cache-dirmoves the full cache to one directory. The daily cleanup
also removes old Git clones and LFS objects.
Compatibility
eval-jobsgives a flake root to--selectas it is, as nix-eval-jobs
does. Before, a flake with a__functoroutput failed.- A set with
__functoris auto-called, asnix-instantiatedoes. "${pkgs.path}"gets the store path that Nix gives it.- The search path is split and classified as in Nix.
- Flakes: a fragment is looked up under
packages.<system>first, a local
Git root can have submodules andshallow=1,inputs.selfoptions apply
to the root flake, andaccept-flake-configwarns only when the flake has
anixConfig. __jsonis read as in Nix: the keys are sorted, and the last of two equal
keys stays.- A command that stops at a feature that iets does not support exits with
code 3, so a caller knows when to use Nix. Ineval-jobs, such an error
is the error of one job, and the exit code does not change. Classic mode
runs the realnixthen. Without a fallback, it exits with code 1, as
Nix does. - Every experimental feature is on. The
experimental-featuressetting and
flags are ignored. - An
hginput fails as unsupported. Before, it ran the realnix. iets
now fetches every source itself.
Fixes
- A long-running host no longer reaches the limit of open files. Before,
the cache of fetched inputs could open too many files, and each
evaluation then failed. - A parallel evaluation no longer stops with a false "all workers idle"
error. eval-jobsfails the run when a write fails or when a worker exits with
an error. It also keeps the errors that a worker prints while it stops.- macOS:
nix-eval-jobsin classic mode starts its workers. Before, it
failed with "unknown flag '--'". - A download no longer fails with
stalled-download-timeoutafter the
process was stopped and continued.
Performance
Evaluation is about 20 % faster than v0.2.0. Measured with the release
binaries on x86_64-linux, with the default number of workers:
| Workload | v0.2.0 | v0.3.0 |
|---|---|---|
bench/workloads/nixos-server.nix |
616 ms | 492 ms |
bench/workloads/nixos-plasma.nix |
795 ms | 628 ms |
Platforms
- Linux: release binaries for x86_64 and aarch64.
- macOS: no release binary.
nix run github:numtide/iets/v0.3.0works on
aarch64-darwin. - Browser: on a Linux host,
nix build .#wasigivesbin/iets.wasm,
which evaluates Nix in a web worker. It has no network and runs no
builds. - Windows: work in progress, with no release binary.