diff options
author | oxalica <oxalicc@pm.me> | 2019-12-24 05:17:33 +0800 |
---|---|---|
committer | oxalica <oxalicc@pm.me> | 2019-12-24 05:28:50 +0800 |
commit | 057b94a3d22b208ec3b2628d6a091b79d4d6f6e8 (patch) | |
tree | 24f63dede2af20cec4aae9236466039ec417958a /pkgs/development/tools/cargo-flamegraph | |
parent | eeaf1f702d4b3d57b4657a162a5e536210b23efb (diff) | |
download | nixlib-057b94a3d22b208ec3b2628d6a091b79d4d6f6e8.tar nixlib-057b94a3d22b208ec3b2628d6a091b79d4d6f6e8.tar.gz nixlib-057b94a3d22b208ec3b2628d6a091b79d4d6f6e8.tar.bz2 nixlib-057b94a3d22b208ec3b2628d6a091b79d4d6f6e8.tar.lz nixlib-057b94a3d22b208ec3b2628d6a091b79d4d6f6e8.tar.xz nixlib-057b94a3d22b208ec3b2628d6a091b79d4d6f6e8.tar.zst nixlib-057b94a3d22b208ec3b2628d6a091b79d4d6f6e8.zip |
cargo-flamegraph: fix runtime dep: linux-perf
Diffstat (limited to 'pkgs/development/tools/cargo-flamegraph')
-rw-r--r-- | pkgs/development/tools/cargo-flamegraph/default.nix | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/development/tools/cargo-flamegraph/default.nix b/pkgs/development/tools/cargo-flamegraph/default.nix index 442035d0f5f8..e4dd9bb69591 100644 --- a/pkgs/development/tools/cargo-flamegraph/default.nix +++ b/pkgs/development/tools/cargo-flamegraph/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, rustPlatform +{ lib, stdenv, fetchFromGitHub, rustPlatform, makeWrapper, perf , Security }: @@ -15,11 +15,17 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "0kmw2n4j5bisac0bv3npbwfz2z00ncd6w8ichwaz5hac5mi1a72f"; - buildInputs = stdenv.lib.optionals stdenv.isDarwin [ + nativeBuildInputs = lib.optionals stdenv.isLinux [ makeWrapper ]; + buildInputs = lib.optionals stdenv.isDarwin [ Security ]; - meta = with stdenv.lib; { + postFixup = lib.optionalString stdenv.isLinux '' + wrapProgram $out/bin/cargo-flamegraph \ + --suffix PATH ':' ${perf}/bin + ''; + + meta = with lib; { description = "Easy flamegraphs for Rust projects and everything else, without Perl or pipes <3"; homepage = https://github.com/ferrous-systems/flamegraph; license = with licenses; [ asl20 /* or */ mit ]; |