mirror of
https://codeberg.org/icewind/mill-scale.git
synced 2026-06-03 09:54:19 +02:00
iai-callgrind support
This commit is contained in:
parent
cf3cf81ddb
commit
3821e5b444
6 changed files with 39 additions and 0 deletions
|
|
@ -17,4 +17,5 @@
|
|||
"wgpu" = {runtime = ["vulkan-loader"];};
|
||||
"audiopus_sys" = {build = ["libopus"];};
|
||||
"unrar_sys" = {build = ["unrar"];};
|
||||
"iai-callgrind" = {native = ["iai-callgrind-runner" "valgrind"];};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,4 +3,5 @@
|
|||
"insta" = ["cargo-insta"];
|
||||
"esp-hal" = ["cargo-espflash" "cargo-espmonitor"];
|
||||
"wasm-bindgen" = ["wasm-pack" "wasm-bindgen-cli"];
|
||||
"iai-callgrind" = ["iai-callgrind-runner" "valgrind"];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
}:
|
||||
flakelight ./. {
|
||||
imports = [flakelight.flakelightModules.extendFlakelight];
|
||||
withOverlays = [(import ./overlay.nix)];
|
||||
formatters = pkgs:
|
||||
with pkgs; {
|
||||
"*.nix" = pkgs.lib.getExe alejandra;
|
||||
|
|
@ -28,5 +29,8 @@
|
|||
inputs.crane = lib.mkDefault crane;
|
||||
inputs.rust-overlay = lib.mkDefault rust-overlay;
|
||||
};
|
||||
packages = {
|
||||
iai-callgrind-runner = pkgs: pkgs.iai-callgrind-runner;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,6 +162,7 @@ in
|
|||
(mkIf (pathExists config.cargoToml) {
|
||||
withOverlays = [
|
||||
(import inputs.rust-overlay)
|
||||
(import ./overlay.nix)
|
||||
(final: {
|
||||
inputs,
|
||||
rust-bin,
|
||||
|
|
|
|||
3
overlay.nix
Normal file
3
overlay.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
prev: final: {
|
||||
iai-callgrind-runner = final.callPackage ./pkgs/iai-callgrind-runner {};
|
||||
}
|
||||
29
pkgs/iai-callgrind-runner/default.nix
Normal file
29
pkgs/iai-callgrind-runner/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
rustPlatform,
|
||||
}:
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "iai-callgrind-runner";
|
||||
version = "v0.15.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "iai-callgrind";
|
||||
repo = "iai-callgrind";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-yOsO1qSkZ4OsAbdS6IqbY9bX6p3JPSxOuHa3W4UoPX8=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-HvcSfLvZFJtkVFeu8DL2+e7PddJz/jJwh9aUtAV7gFY=";
|
||||
|
||||
buildAndTestSubdir = "iai-callgrind-runner";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "High-precision and consistent benchmarking framework/harness for Rust";
|
||||
homepage = "https://github.com/iai-callgrind/iai-callgrind";
|
||||
license = licenses.mit;
|
||||
mainProgram = "iai-callgrind-runner";
|
||||
};
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue