Skip to content

Add cargo llvm-cov to flake devshell#495

Merged
DanGould merged 1 commit intopayjoin:masterfrom
nothingmuch:llcov-in-flake
Jan 24, 2025
Merged

Add cargo llvm-cov to flake devshell#495
DanGould merged 1 commit intopayjoin:masterfrom
nothingmuch:llcov-in-flake

Conversation

@nothingmuch
Copy link
Collaborator

No description provided.

@coveralls
Copy link
Collaborator

coveralls commented Jan 19, 2025

Pull Request Test Coverage Report for Build 12938871114

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 78.541%

Totals Coverage Status
Change from base Build 12933041269: 0.0%
Covered Lines: 3638
Relevant Lines: 4632

💛 - Coveralls

Copy link
Contributor

@DanGould DanGould left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I tried to test output says cargo-llvm-cov-0.6.14 is marked as broken. is that OK?

Details
payjoin % nix develop
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/8vz84mqgnm1gz5yk7hgnnb5gir5hjxas-source/pkgs/stdenv/generic/make-derivation.nix:375:7

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

     at /nix/store/8vz84mqgnm1gz5yk7hgnnb5gir5hjxas-source/pkgs/stdenv/generic/make-derivation.nix:419:7:

      418|       depsBuildBuild              = elemAt (elemAt dependencies 0) 0;
      419|       nativeBuildInputs           = elemAt (elemAt dependencies 0) 1;
         |       ^
      420|       depsBuildTarget             = elemAt (elemAt dependencies 0) 2;

   error: Package ‘cargo-llvm-cov-0.6.14’ in /nix/store/8vz84mqgnm1gz5yk7hgnnb5gir5hjxas-source/pkgs/by-name/ca/cargo-llvm-cov/package.nix:85 is marked as broken, refusing to evaluate.

   a) To temporarily allow broken packages, you can use an environment variable
      for a single invocation of the nix tools.

        $ export NIXPKGS_ALLOW_BROKEN=1

      Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
            then pass `--impure` in order to allow use of environment variables.

   b) For `nixos-rebuild` you can set
     { nixpkgs.config.allowBroken = true; }
   in configuration.nix to override this.

   c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
     { allowBroken = true; }
   to ~/.config/nixpkgs/config.nix.

@nothingmuch nothingmuch marked this pull request as draft January 20, 2025 12:17
@nothingmuch
Copy link
Collaborator Author

see NixOS/nixpkgs#351574 and its discussion

i guess we can make it conditional, and skip it on mac

@DanGould
Copy link
Contributor

optional and omitted on mac is a workable solution

@DanGould
Copy link
Contributor

See how optional compilation is configured in mutiny-node's flake

@nothingmuch nothingmuch marked this pull request as ready for review January 23, 2025 22:18
@nothingmuch
Copy link
Collaborator Author

i only added the optionality to the cargo-llvm-cov package (not the associated rust toolchain component), and tested that the devshell is no longer broken on a mac

Copy link
Contributor

@DanGould DanGould left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK 5654ea8 by running nix develop on MacOS

@DanGould DanGould merged commit 3511be3 into payjoin:master Jan 24, 2025
6 checks passed
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

Successfully merging this pull request may close these issues.

3 participants