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

Errors and warnings with nix flake. #664

Open
TornaxO7 opened this issue Jan 9, 2025 · 2 comments
Open

Errors and warnings with nix flake. #664

TornaxO7 opened this issue Jan 9, 2025 · 2 comments

Comments

@TornaxO7
Copy link
Contributor

TornaxO7 commented Jan 9, 2025

Hi! I'm trying to add a home-manager module to clipcat. However, I'm already getting errors although I didn't change anything:

       error: attribute 'version' missing
       at /nix/store/0bmzw2riqpf8ikw0dvcza46lpif1lw2d-source/flake.nix:89:33:
           88|           container = pkgs.callPackage ./devshell/container.nix {
           89|             inherit (cargoToml) version;
             |                                 ^
           90|             inherit name clipcat;

The solution for this is easy, however after fixing this issue I'm getting new ones after executing nix flake check:

fetching git input 'git+file:///home/tornax/projects/clipcat'
warning: Git tree '/home/tornax/projects/clipcat' is dirty
evaluating flake...
checking flake output 'overlays'...
checking overlay 'overlays.default'...
checking flake output 'packages'...
checking derivation packages.x86_64-linux.default...
derivation evaluated to /nix/store/59k3y4fl8xzlal3vydybz0g38syzjs3q-clipcat-0.20.0.drv
checking derivation packages.x86_64-linux.clipcat...
derivation evaluated to /nix/store/59k3y4fl8xzlal3vydybz0g38syzjs3q-clipcat-0.20.0.drv
checking derivation packages.x86_64-linux.container...
derivation evaluated to /nix/store/xanqfbxx4bl2y4hmn2wvpxkhz4cc0xl9-docker-image-clipcat.tar.gz.drv
checking flake output 'formatter'...
checking flake output 'devShells'...
checking derivation devShells.x86_64-linux.default...
derivation evaluated to /nix/store/mxfbr57mbr9in23dsxsnpx3j5j93ny0l-dev-shell.drv
checking flake output 'checks'...
checking derivation checks.x86_64-linux.rust-format...
trace: evaluation warning: crane will use a placeholder value since `name` cannot be found in /nix/store/hlyjqygf5nji6hfhx4glqyv6mivd23ph-source/Cargo.toml
to silence this warning consider one of the following:
- setting `pname = "...";` in the derivation arguments explicitly
- setting `package.name = "..."` or `package.metadata.crane.name` = "..." or `workspace.metadata.crane.name` = "..." in the root Cargo.toml
- explicitly looking up the values from a different Cargo.toml via 
  `craneLib.crateNameFromCargoToml { cargoToml = ./path/to/Cargo.toml; }`

To find the source of this warning, rerun nix with:
`NIX_ABORT_ON_WARN=1 nix --option pure-eval false --show-trace ...`


derivation evaluated to /nix/store/hjk15mkjqn5mgh4c12kd33h4q9iwnh3w-cargo-package-fmt-0.20.0.drv
checking derivation checks.x86_64-linux.rust-nextest...
trace: evaluation warning: crane will use a placeholder value since `name` cannot be found in /nix/store/hlyjqygf5nji6hfhx4glqyv6mivd23ph-source/Cargo.toml
to silence this warning consider one of the following:
- setting `pname = "...";` in the derivation arguments explicitly
- setting `package.name = "..."` or `package.metadata.crane.name` = "..." or `workspace.metadata.crane.name` = "..." in the root Cargo.toml
- explicitly looking up the values from a different Cargo.toml via 
  `craneLib.crateNameFromCargoToml { cargoToml = ./path/to/Cargo.toml; }`

To find the source of this warning, rerun nix with:
`NIX_ABORT_ON_WARN=1 nix --option pure-eval false --show-trace ...`


trace: evaluation warning: crane will use a placeholder value since `name` cannot be found in /nix/store/hlyjqygf5nji6hfhx4glqyv6mivd23ph-source/Cargo.toml
to silence this warning consider one of the following:
- setting `pname = "...";` in the derivation arguments explicitly
- setting `package.name = "..."` or `package.metadata.crane.name` = "..." or `workspace.metadata.crane.name` = "..." in the root Cargo.toml
- explicitly looking up the values from a different Cargo.toml via 
  `craneLib.crateNameFromCargoToml { cargoToml = ./path/to/Cargo.toml; }`

To find the source of this warning, rerun nix with:
`NIX_ABORT_ON_WARN=1 nix --option pure-eval false --show-trace ...`


derivation evaluated to /nix/store/cdxvyzpmqvga3prf04dqzrlb02zxncz3-cargo-package-nextest-0.20.0.drv
checking flake output 'homeManagerModules'...
warning: unknown flake output 'homeManagerModules'
running 2 flake checks...
building '/nix/store/cdxvyzpmqvga3prf04dqzrlb02zxncz3-cargo-package-nextest-0.20.0.drv'...
error: builder for '/nix/store/cdxvyzpmqvga3prf04dqzrlb02zxncz3-cargo-package-nextest-0.20.0.drv' failed with exit code 101;
       last 25 log lines:
       >    Compiling clipcat-base v0.20.0 (/build/source/crates/base)
       >    Compiling clipcat-proto v0.20.0 (/build/source/crates/proto)
       >    Compiling clipcat-metrics v0.20.0 (/build/source/crates/metrics)
       >    Compiling clipcat-cli v0.20.0 (/build/source/crates/cli)
       >    Compiling clipcatctl v0.20.0 (/build/source/clipcatctl)
       >    Compiling clipcatd v0.20.0 (/build/source/clipcatd)
       >    Compiling clipcat-notify v0.20.0 (/build/source/clipcat-notify)
       >    Compiling clipcat-menu v0.20.0 (/build/source/clipcat-menu)
       >    Compiling clipcat-clipboard v0.20.0 (/build/source/crates/clipboard)
       >    Compiling clipcat-dbus-variant v0.20.0 (/build/source/crates/dbus-variant)
       >    Compiling clipcat-external-editor v0.20.0 (/build/source/crates/external-editor)
       > error: failed to run custom build command for `clipcat-proto v0.20.0 (/build/source/crates/proto)`
       >
       > Caused by:
       >   process didn't exit successfully: `/build/source/target/release/build/clipcat-proto-06fb2fd5a370b4e8/build-script-build` (exit status: 1)
       >   --- stdout
       >   cargo:rerun-if-changed=proto/manager.proto
       >   cargo:rerun-if-changed=proto/system.proto
       >   cargo:rerun-if-changed=proto/watcher.proto
       >   cargo:rerun-if-changed=proto/
       >
       >   --- stderr
       >   Error: Custom { kind: NotFound, error: "Could not find `protoc`. If `protoc` is installed, try setting the `PROTOC` environment variable to the path of the `protoc` binary. To install it on Debian, run `apt-get install protobuf-compiler`. It is also available at https://github.com/protocolbuffers/protobuf/releases  For more information: https://docs.rs/prost-build/#sourcing-protoc" }
       > warning: build failed, waiting for other jobs to finish...
       > error: command `/nix/store/acp6kb9vi0gwhyabpv86dl5wrh5676jp-rust-mixed/bin/cargo test --no-run --message-format json-render-diagnostics --profile release` exited with code 101
       For full logs, run 'nix log /nix/store/cdxvyzpmqvga3prf04dqzrlb02zxncz3-cargo-package-nextest-0.20.0.drv'.

Are those issues known?

@xrelkd
Copy link
Owner

xrelkd commented Jan 14, 2025

Hi @TornaxO7.
Please try again with this PR #667.

@TornaxO7
Copy link
Contributor Author

Now I'm getting

race: evaluation warning: crane will use a placeholder value since `name` cannot be found in /nix/store/5y645jh9g3ir04xk2rqi2rd60r3y8vwv-source/Cargo.toml
to silence this warning consider one of the following:
- setting `pname = "...";` in the derivation arguments explicitly
- setting `package.name = "..."` or `package.metadata.crane.name` = "..." or `workspace.metadata.crane.name` = "..." in the root Cargo.toml
- explicitly looking up the values from a different Cargo.toml via
  `craneLib.crateNameFromCargoToml { cargoToml = ./path/to/Cargo.toml; }`

To find the source of this warning, rerun nix with:
`NIX_ABORT_ON_WARN=1 nix --option pure-eval false --show-trace ...`


trace: evaluation warning: crane will use a placeholder value since `name` cannot be found in /nix/store/5y645jh9g3ir04xk2rqi2rd60r3y8vwv-source/Cargo.toml
to silence this warning consider one of the following:
- setting `pname = "...";` in the derivation arguments explicitly
- setting `package.name = "..."` or `package.metadata.crane.name` = "..." or `workspace.metadata.crane.name` = "..." in the root Cargo.toml
- explicitly looking up the values from a different Cargo.toml via
  `craneLib.crateNameFromCargoToml { cargoToml = ./path/to/Cargo.toml; }`

To find the source of this warning, rerun nix with:
`NIX_ABORT_ON_WARN=1 nix --option pure-eval false --show-trace ...`


trace: evaluation warning: crane will use a placeholder value since `name` cannot be found in /nix/store/5y645jh9g3ir04xk2rqi2rd60r3y8vwv-source/Cargo.toml
to silence this warning consider one of the following:
- setting `pname = "...";` in the derivation arguments explicitly
- setting `package.name = "..."` or `package.metadata.crane.name` = "..." or `workspace.metadata.crane.name` = "..." in the root Cargo.toml
- explicitly looking up the values from a different Cargo.toml via
  `craneLib.crateNameFromCargoToml { cargoToml = ./path/to/Cargo.toml; }`

To find the source of this warning, rerun nix with:
`NIX_ABORT_ON_WARN=1 nix --option pure-eval false --show-trace ...`


trace: evaluation warning: crane will use a placeholder value since `name` cannot be found in /nix/store/5y645jh9g3ir04xk2rqi2rd60r3y8vwv-source/Cargo.toml
to silence this warning consider one of the following:
- setting `pname = "...";` in the derivation arguments explicitly
- setting `package.name = "..."` or `package.metadata.crane.name` = "..." or `workspace.metadata.crane.name` = "..." in the root Cargo.toml
- explicitly looking up the values from a different Cargo.toml via
  `craneLib.crateNameFromCargoToml { cargoToml = ./path/to/Cargo.toml; }`

To find the source of this warning, rerun nix with:
`NIX_ABORT_ON_WARN=1 nix --option pure-eval false --show-trace ...`


trace: evaluation warning: crane will use a placeholder value since `name` cannot be found in /nix/store/5y645jh9g3ir04xk2rqi2rd60r3y8vwv-source/Cargo.toml
to silence this warning consider one of the following:
- setting `pname = "...";` in the derivation arguments explicitly
- setting `package.name = "..."` or `package.metadata.crane.name` = "..." or `workspace.metadata.crane.name` = "..." in the root Cargo.toml
- explicitly looking up the values from a different Cargo.toml via
  `craneLib.crateNameFromCargoToml { cargoToml = ./path/to/Cargo.toml; }`

To find the source of this warning, rerun nix with:
`NIX_ABORT_ON_WARN=1 nix --option pure-eval false --show-trace ...`


error: builder for '/nix/store/l5divn63c2vakfj36dail7nap6nmwnxa-check-format.drv' failed with exit code 1;
       last 25 log lines:
       > WARN no formatter for path: crates/server/src/snippets/mod.rs
       > WARN no formatter for path: crates/server/src/watcher/error.rs
       > WARN no formatter for path: crates/server/src/watcher/mod.rs
       > WARN no formatter for path: crates/server/src/watcher/options.rs
       > WARN no formatter for path: crates/server/src/watcher/toggle.rs
       > WARN no formatter for path: dev-support/bin/create-package
       > WARN no formatter for path: dev-support/bin/prepare-deb-package
       > WARN no formatter for path: dev-support/bin/prepare-rpm-package
       > WARN no formatter for path: dev-support/codespell-ignore
       > WARN no formatter for path: dev-support/containers/alpine/Containerfile
       > WARN no formatter for path: dev-support/containers/docker-bake.hcl
       > WARN no formatter for path: docs/_static/screenshot-finder-dmenu.png
       > WARN no formatter for path: docs/_static/screenshot-finder-rofi.png
       > WARN no formatter for path: docs/_static/screenshot-finder-skim.png
       > WARN no formatter for path: flake.lock
       > ERRO formatter | protobuf: failed to apply with options '[-eucx buf format --write
       > ]': exit status 1
       >
       > + buf format --write
       > Failure: mkdir /homeless-shelter: permission denied
       >
       > traversed 189 files
       > emitted 35 files for processing
       > formatted 32 files (0 changed) in 202ms
       > Error: formatting failures detected
       For full logs, run 'nix log /nix/store/l5divn63c2vakfj36dail7nap6nmwnxa-check-format.drv'.
error: build of '/nix/store/5ja0d52001z07pkcksr0ml0p7x8qwik7-cargo-package-clippy-0.20.0.drv', '/nix/store/7jpn8z0rhzl179ya4s0i6sjsak2qpp0k-cargo-package-build-0.20.0.drv', '/nix/store/alrp87lg1az55fsgmal61z243n7myz5s-cargo-package-fmt-0.20.0.drv', '/nix/store/l5divn63c2vakfj36dail7nap6nmwnxa-check-format.drv', '/nix/store/qdjwahr6vgqkg55vdila808vr06p7zii-cargo-package-nextest-0.20.0.drv' failed

after executing nix flake check

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