11 version = "0-unstable-2024-11-18";
14 url = "https://go.googlesource.com/perf";
15 rev = "34caac8501763e3ea700ee019bf2c29671a30c55";
16 hash = "sha256-b46zDtBlNpVMTwXTL9sYSpfEVJ87P2ZRQ7MVhOI0r/s=";
19 vendorHash = "sha256-5cGgUTruCdfDhvLxXzl5gg2BtAC8HU7ZBL7Niw++HZ0=";
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 ];