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

llvm-cov dependency missing #143

Closed
lenianiva opened this issue Nov 8, 2023 · 1 comment
Closed

llvm-cov dependency missing #143

lenianiva opened this issue Nov 8, 2023 · 1 comment

Comments

@lenianiva
Copy link

I have my pkgs set to

      overlays = [
        (import rust-overlay)
        (self: super: let
          toolchain = (super.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml).override { extensions = [ "rust-src" ]; };
        in {
          rustc = toolchain;
        })
      ];
      pkgs = import nixpkgs { inherit system overlays; };

but then when I have pkgs.cargo-llvm-cov as a dependency of something else, I get

error:
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'nix-shell'
         whose name attribute is located at /nix/store/35dcag44a0ymww0vy0s4jjgxwpv9g62d-source/pkgs/stdenv/generic/make-derivation.nix:300:7

       … while evaluating attribute 'buildInputs' of derivation 'nix-shell'

         at /nix/store/35dcag44a0ymww0vy0s4jjgxwpv9g62d-source/pkgs/stdenv/generic/make-derivation.nix:347:7:

          346|       depsHostHost                = lib.elemAt (lib.elemAt dependencies 1) 0;
          347|       buildInputs                 = lib.elemAt (lib.elemAt dependencies 1) 1;
             |       ^
          348|       depsTargetTarget            = lib.elemAt (lib.elemAt dependencies 2) 0;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute 'llvmPackages' missing

       at /nix/store/35dcag44a0ymww0vy0s4jjgxwpv9g62d-source/pkgs/development/tools/rust/cargo-llvm-cov/default.nix:33:10:

           32|
           33|   llvm = rustc.llvmPackages.llvm;
             |          ^
           34|

How can I get llvmPackages to be a part of rustc?

@oxalica
Copy link
Owner

oxalica commented Nov 8, 2023

nixpkgs' packages use nixpkgs' rustc which has additional attributes and is packaged to use nixpkgs' dependencies (eg. LLVM). We are shipping binary distributed ones which use upstream (patched) LLVM.

    (self: super: let
      toolchain = (super.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml).override { extensions = [ "rust-src" ]; };
    in {
      rustc = toolchain;
    })

Please use our packages individually and not make it override nixpkgs'. We do not support it.

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