diff --git a/config.nix b/config.nix index bc9b163..7d3f57c 100644 --- a/config.nix +++ b/config.nix @@ -28,18 +28,18 @@ let # The command to use for the build. cargoBuild = allowFun attrs0 "cargoBuild" - ''env CARGO_TARGET_DIR=out cargo $cargo_options build $cargo_build_options >> $cargo_build_output_json''; + ''cargo $cargo_options build $cargo_build_options >> $cargo_build_output_json''; # Options passed to cargo build, i.e. `cargo build `. These options # can be accessed during the build through the environment variable # `cargo_build_options`.
- # Note: naersk relies on the the + # Note: naersk relies on the `--out-dir out` option and the # `--message-format` option. The `$cargo_message_format` variable is set # based on the cargo version.
# Note: these values are not (shell) escaped, meaning that you can use # environment variables but must be careful when introducing e.g. spaces.
cargoBuildOptions = - allowFun attrs0 "cargoBuildOptions" [ "$cargo_release" ''-j "$NIX_BUILD_CORES"'' "--message-format=$cargo_message_format" ]; + allowFun attrs0 "cargoBuildOptions" [ "$cargo_release" ''-j "$NIX_BUILD_CORES"'' "--out-dir" "out" "--message-format=$cargo_message_format" ]; # When `true`, rustc remaps the (`/nix/store`) source paths to `/sources` @@ -71,7 +71,7 @@ let # Note: these values are not (shell) escaped, meaning that you can use # environment variables but must be careful when introducing e.g. spaces.
cargoOptions = - allowFun attrs0 "cargoOptions" [ ]; + allowFun attrs0 "cargoOptions" [ "-Z" "unstable-options" ]; # When true, `cargo doc` is run and a new output `doc` is generated. doDoc = attrs0.doDoc or false;