Skip to content

Commit

Permalink
cargo: fix tests eval
Browse files Browse the repository at this point in the history
Without the change `cargo` tests fail the eval as:

    $ nix build --no-link -f. cargo.tests
    error: attribute 'tests' missing

           at pkgs/development/compilers/rust/cargo.nix:22:15:

               21|
               22|   passthru = {
                 |               ^
               23|     rustc = rustc;

The test teried to pull `tests` attribute from `rustc`, which is a
wrapper without `tests`. Pull tests from unwrapped rust instead.
  • Loading branch information
trofi authored and zowoq committed Dec 29, 2023
1 parent 017bc47 commit a395723
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/development/compilers/rust/cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage.override {

passthru = {
rustc = rustc;
inherit (rustc) tests;
inherit (rustc.unwrapped) tests;
};

# Upstream rustc still assumes that musl = static[1]. The fix for
Expand Down

0 comments on commit a395723

Please sign in to comment.