Merge pull request #244951 from figsoda/samply
This commit is contained in:
commit
fbd5ec5eca
55
pkgs/development/tools/misc/samply/default.nix
Normal file
55
pkgs/development/tools/misc/samply/default.nix
Normal file
|
@ -0,0 +1,55 @@
|
|||
{ lib
|
||||
, rustPlatform
|
||||
, fetchCrate
|
||||
, jq
|
||||
, moreutils
|
||||
, stdenv
|
||||
, darwin
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "samply";
|
||||
version = "0.11.0";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit pname version;
|
||||
hash = "sha256-V0uAS7Oo7wv0yU5CgqqYhltwM5PXJ3GP/TLVZV2GkkI=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-jsuICNVY3noZi/+mgVj9uUu53z+5bW9Vi5CBKcHOqSI=";
|
||||
|
||||
# the dependencies linux-perf-data and linux-perf-event-reader contains both README.md and Readme.md,
|
||||
# which causes a hash mismatch on systems with a case-insensitive filesystem
|
||||
# this removes the readme files and updates cargo's checksum file accordingly
|
||||
depsExtraArgs = {
|
||||
nativeBuildInputs = [
|
||||
jq
|
||||
moreutils
|
||||
];
|
||||
|
||||
postBuild = ''
|
||||
for crate in linux-perf-data linux-perf-event-reader; do
|
||||
pushd $name/$crate
|
||||
|
||||
rm -f README.md Readme.md
|
||||
jq 'del(.files."README.md") | del(.files."Readme.md")' \
|
||||
.cargo-checksum.json -c \
|
||||
| sponge .cargo-checksum.json
|
||||
|
||||
popd
|
||||
done
|
||||
'';
|
||||
};
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk.frameworks.CoreServices
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A command line profiler for macOS and Linux";
|
||||
homepage = "https://github.com/mstange/samply";
|
||||
changelog = "https://github.com/mstange/samply/releases/tag/samply-v${version}";
|
||||
license = with licenses; [ asl20 mit ];
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
|
@ -19790,6 +19790,8 @@ with pkgs;
|
|||
|
||||
saleae-logic-2 = callPackage ../development/tools/misc/saleae-logic-2 { };
|
||||
|
||||
samply = callPackage ../development/tools/misc/samply { };
|
||||
|
||||
sauce-connect = callPackage ../development/tools/sauce-connect { };
|
||||
|
||||
sawjap = callPackage ../development/tools/java/sawjap { };
|
||||
|
|
Loading…
Reference in a new issue