cargo-kcov: ensure kcov is in PATH

The tool is non-functional without this.
launchpad/nixpkgs/master
Alyssa Ross 3 years ago
parent 5d73f669a8
commit 9261db9db4
No known key found for this signature in database
GPG Key ID: F9DBED4859B271C0
  1. 9
      pkgs/tools/package-management/cargo-kcov/default.nix

@ -1,6 +1,8 @@
{ lib
, rustPlatform
, fetchFromGitHub
, makeWrapper
, kcov
}:
rustPlatform.buildRustPackage rec {
@ -17,6 +19,13 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "0m5gfyjzzwd8wkbb388vmd785dy334x0migq3ssi7dlah9zx62bj";
doCheck = false;
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/cargo-kcov \
--prefix PATH : ${lib.makeBinPath [ kcov ]}
'';
meta = with lib; {
description = "Cargo subcommand to run kcov to get coverage report on Linux";
homepage = "https://github.com/kennytm/cargo-kcov";

Loading…
Cancel
Save