Compiling kani-driver v0.50.0 (/build/source/kani-driver)
error: failed to run custom build command for `kani-compiler v0.50.0 (/build/source/kani-compiler)`
Caused by:
process didn't exit successfully: `/build/source/target/release/build/kani-compiler-6b6e8907781a95f1/build-script-build` (exit status: 101)
--- stderr
thread 'main' panicked at kani-compiler/build.rs:25:47:
called `Result::unwrap()` on an `Err` value: NotPresent
The relevant line in build.rs is
let rustup_home = env::var("RUSTUP_HOME").unwrap();
which aligns with the build instructions’ indication that cargo be installed via rustup.
Not sure how to deal with this in Nix’ sandboxed environment. How should I proceed?
This gets me a bit further, but I grind to a halt on unresolved imports.
The unusual build procedure combined with my limited Nix packaging experience probably make this lie beyond my reach. On the one hand, I’d like to understand how to deal with this; on the other, I can’t really justify the time required.
How about using the pre-compiled binaries they provide?
FWIW, this seems to work to build kani with rust-overlay from oxalica/rust-overlay. But it still wants to be installed in ~/.kani with cbmc and friends, so it’s not usable.