nix-community / crate2nix

rebuild only changed crates in CI with crate2nix and nix
https://nix-community.github.io/crate2nix/
Apache License 2.0
364 stars 86 forks source link

Use rust lib to set target vendor #275

Closed jordanisaacs closed 11 months ago

jordanisaacs commented 1 year ago

Uses the new rust lib function toTargetVendor for setting the vendor for feature/dependency resolution & regenerated Cargo.nix files. Needs nixpkgs to be updated to a version of 21.11 that includes toTargetVendor, unsure how to do that.

Ericson2314 commented 1 year ago

@jordanisaacs it is done with Niv, or you can just manually modify the file.

jordanisaacs commented 1 year ago

I couldn't run the tests locally because I got this error

error: the string '2mz4bcqmqrkndkyqnbr57djd9fs6zqsh-crates-io-aho-corasick-0.7.18' is not allowed to refer to a store path (such as '!out!/nix/store/lpa1wknhyyin0hxd9scck1si0459hfpb-crates-io-aho-corasick-0.7.18.drv')
Ericson2314 commented 1 year ago

I suspect https://github.com/kolloch/crate2nix/pull/272 is not quite right. Try reverting that.

jordanisaacs commented 1 year ago

@Ericson2314 I tried reverting it but did not change the error. Not entirely sure what is causing the error but it occurs when entering the nix-shell --pure shell.nix. I was runnning nix-shell on version 2.13.2

Ericson2314 commented 1 year ago

@jordanisaacs Can you do it again with --show-trace?

Ericson2314 commented 1 year ago

Ah, I can reproduce.

jordanisaacs commented 1 year ago

Here is the super long trace if you still want it: https://gist.github.com/jordanisaacs/18fa608cb59dd924ec8567077ee01ff8

jordanisaacs commented 1 year ago

Occurs in building cargo-release

Ericson2314 commented 1 year ago

Ah I was surprised because this looked like a bug I had fix. But it was! See #277 which bumps the prior version of crate2nix pinned in crate2nix.

jordanisaacs commented 1 year ago

@Ericson2314 Should be working now! ran ./run_tests.sh and they all passed.

kolloch commented 11 months ago

Thanks :)