!yUrHuDcxUngfTlDbiy:matrix.org

flakelight

45 Members
https://github.com/nix-community/flakelight13 Servers

Load older messages


SenderMessageTime
27 Oct 2025
@niclas:overby.meNiclas Overby Ⓝ *

Here is my Nushell script:

#!/usr/bin/env nu
# Generate a flamegraph from a nix flake evaluation
# Usage: script.nu <flake-path>

def main [flake_path: string] {
    print $"Evaluating flake: ($flake_path)"

    # Create temporary directory for profile data
    let tmp_dir = (mktemp -d)
    let profile_path = ($tmp_dir | path join "nix.profile")

    # Run nix eval with profiler output
    nix eval --impure --no-eval-cache $flake_path --option eval-profiler flamegraph --option eval-profile-file $profile_path

    # Generate flamegraph SVG from profile data
    open $profile_path | inferno-flamegraph | save -f flamegraph.svg

    print "Flamegraph saved to flamegraph.svg"
}
09:52:50
@niclas:overby.meNiclas Overby ⓃYeah, I ended up moving pre-commit-check-run to a package, and refer to it from pkgs10:05:59
@accelbread:matrix.orgaccelbreadmakes sense. withOverlays does same thing if you dont want to export it from the flake18:04:47

There are no newer messages yet.


Back to Room ListRoom Version: 10