about summary refs log tree commit diff
path: root/pkgs/development/compilers/rust
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2023-12-28 20:30:19 +0000
committerzowoq <59103226+zowoq@users.noreply.github.com>2023-12-29 10:20:59 +1000
commita3957236ce752b03d0ba3c388422b730129c6085 (patch)
treee090482124a49df2d06a07303b0bb9a73bc8c93a /pkgs/development/compilers/rust
parent017bc47e74fa7de896236c466bd3c367a7fa63b0 (diff)
downloadnixlib-a3957236ce752b03d0ba3c388422b730129c6085.tar
nixlib-a3957236ce752b03d0ba3c388422b730129c6085.tar.gz
nixlib-a3957236ce752b03d0ba3c388422b730129c6085.tar.bz2
nixlib-a3957236ce752b03d0ba3c388422b730129c6085.tar.lz
nixlib-a3957236ce752b03d0ba3c388422b730129c6085.tar.xz
nixlib-a3957236ce752b03d0ba3c388422b730129c6085.tar.zst
nixlib-a3957236ce752b03d0ba3c388422b730129c6085.zip
cargo: fix `tests` eval
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.
Diffstat (limited to 'pkgs/development/compilers/rust')
-rw-r--r--pkgs/development/compilers/rust/cargo.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/compilers/rust/cargo.nix b/pkgs/development/compilers/rust/cargo.nix
index 1bc1777acd47..ff0ecf45fd23 100644
--- a/pkgs/development/compilers/rust/cargo.nix
+++ b/pkgs/development/compilers/rust/cargo.nix
@@ -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