devshell/.nix/repo/benchmark.nix
2025-07-31 12:37:19 +02:00

19 lines
551 B
Nix

{
inputs,
cell,
}: {
bench = inputs.nixpkgs.writeShellApplication {
name = "benchmark";
runtimeInputs = [inputs.nixpkgs.hyperfine];
text = ''
echo "Comparison cases first:"
hyperfine -w 3 \
'nix-instantiate ${inputs.self}/benchmark/shared.nix' \
'nix-instantiate ${inputs.self}/benchmark/empty.nix'
echo "Now real benchmark:"
hyperfine -w 3 \
'nix-instantiate ${inputs.self}/benchmark/nixpkgs-shell.nix' \
'nix-instantiate ${inputs.self}/benchmark/devshell.nix'
'';
};
}