naersk
naersk copied to clipboard
error: failed to parse lock file at: /build/dummy-src/Cargo.lock
I am getting this error when I try to build my flake package in NixOS, but if I try to build the package using nix build it works perfectly fine. Has anyone seen this before? cause I don't seem to find anything about it when searching.
Link to package: https://github.com/dvaerum/gpg-ssh
error: builder for '/nix/store/61kfr5w3gmi1cb87k3clf82c0lxcwnmn-gpg-ssh-deps-0.1.0.drv' failed with exit code 101;
last 25 log lines:
> unpacking source archive /nix/store/nnl95b1b3z5wsdg2hggc928cgsc0bh7i-dummy-src
> source root is dummy-src
> Running phase: patchPhase
> Running phase: updateAutotoolsGnuConfigScriptsPhase
> Running phase: configurePhase
> [naersk] cargo_version (read): 1.77.1
> [naersk] cargo_message_format (set): json-diagnostic-rendered-ansi
> [naersk] cargo_release: --release
> [naersk] cargo_options:
> [naersk] cargo_build_options: $cargo_release -j "$NIX_BUILD_CORES" --message-format=$cargo_message_format
> [naersk] cargo_test_options: $cargo_release -j "$NIX_BUILD_CORES"
> [naersk] RUST_TEST_THREADS: 24
> [naersk] cargo_bins_jq_filter: .
> [naersk] cargo_build_output_json (created): /build/tmp.UQHwq76qL0
> [naersk] RUSTFLAGS:
> [naersk] CARGO_BUILD_RUSTFLAGS:
> [naersk] CARGO_BUILD_RUSTFLAGS (updated): --remap-path-prefix /nix/store/41wxwwl4im7ar73d7yv4vvq8nr5s0lj6-crates-io-dependencies=/sources --remap-path-prefix /nix/store/3zhdagvdcp6g8l0kip2f9aza2q9yp321-git-dependencies=/sources
> Running phase: buildPhase
> cargo build $cargo_release -j "$NIX_BUILD_CORES" --message-format=$cargo_message_format
> warning: Both `/build/dummy-src/.cargo-home/config` and `/build/dummy-src/.cargo-home/config.toml` exist. Using `/build/dummy-src/.cargo-home/config`
> error: failed to parse lock file at: /build/dummy-src/Cargo.lock
>
> Caused by:
> lock file version 4 requires `-Znext-lockfile-bump`
> [naersk] cargo returned with exit code 101, exiting
For full logs, run 'nix log /nix/store/61kfr5w3gmi1cb87k3clf82c0lxcwnmn-gpg-ssh-deps-0.1.0.drv'.
i'm getting this now in a flake.nix file
were you able to resolve it?
from what i see it uses the stable rather then nightly and am not sure why
i had to change mine from
nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling";
to
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
Nope, I have not found a solution yet, but I will give yours a try, when I get back to playing with it
don't forget the follows
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
fenix.url = "github:nix-community/fenix";
fenix.inputs.nixpkgs.follows = "nixpkgs";
naersk.url = "github:nix-community/naersk";
naersk.inputs.nixpkgs.follows = "nixpkgs";
anf if you use devenv
devenv.url = "github:cachix/devenv";
devenv.inputs.nixpkgs.follows = "nixpkgs";