Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: failed to parse lock file at: /build/dummy-src/Cargo.lock #334

Open
dvaerum opened this issue Nov 21, 2024 · 5 comments
Open

error: failed to parse lock file at: /build/dummy-src/Cargo.lock #334

dvaerum opened this issue Nov 21, 2024 · 5 comments

Comments

@dvaerum
Copy link

dvaerum commented Nov 21, 2024

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-am-logger
Copy link

i-am-logger commented Dec 4, 2024

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-am-logger
Copy link

i had to change mine from
nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling";
to
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";

@dvaerum
Copy link
Author

dvaerum commented Dec 6, 2024

Nope, I have not found a solution yet, but I will give yours a try, when I get back to playing with it

@i-am-logger
Copy link

i-am-logger commented Dec 6, 2024

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";

@i-am-logger
Copy link

anf if you use devenv

devenv.url = "github:cachix/devenv";
devenv.inputs.nixpkgs.follows = "nixpkgs";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants