11 version = "0-unstable-2024-09-05";
14 url = "https://go.googlesource.com/perf";
15 rev = "ce4811554b022ac27d024d355ad160e95079bec1";
16 hash = "sha256-kJJod7Qma3++lrctezYltB9hV8/gH/CycHrk+GpOasE=";
19 vendorHash = "sha256-VWywJ1LalYcfOQjrC0sLBfbQyIg8fYv4paMlIfa3RxI=";
21 passthru.updateScript = writeShellScript "update-goperf" ''
22 export UPDATE_NIX_ATTR_PATH=goperf
23 ${lib.escapeShellArgs (unstableGitUpdater { inherit (src) url; })}
25 oldhash="$(nix-instantiate . --eval --strict -A "goperf.goModules.drvAttrs.outputHash" | cut -d'"' -f2)"
26 newhash="$(nix-build -A goperf.goModules --no-out-link 2>&1 | tail -n3 | grep 'got:' | cut -d: -f2- | xargs echo || true)"
27 fname="$(nix-instantiate --eval -E 'with import ./. {}; (builtins.unsafeGetAttrPos "version" goperf).file' | cut -d'"' -f2)"
28 ${lib.getExe sd} --string-mode "$oldhash" "$newhash" "$fname"
32 description = "Tools and packages for analyzing Go benchmark results";
33 homepage = "https://cs.opensource.google/go/x/perf";
34 license = licenses.bsd3;
35 platforms = platforms.all;
36 maintainers = with maintainers; [ pbsds ];