11 version = "unstable-2023-11-08";
14 url = "https://go.googlesource.com/perf";
15 rev = "cb71e802ccb878a069712546879bf26489f0f300";
16 hash = "sha256-1NvrelLsy9lrepttXXnggc0oycC6EgJgU80iXDu3IoI=";
19 vendorHash = "sha256-dJQHqIR6v0yYbxplytkdA98IHtdxnsvi9X6kIESCsB8=";
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.go-modules.drvAttrs.outputHash" | cut -d'"' -f2)"
26 newhash="$(nix-build -A goperf.go-modules --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 ];