whatisgithub

What is nixpkgs-stats?

arunoruto/nixpkgs-stats — explained in plain English

Analysis updated 2026-05-18

0PythonAudience · developerComplexity · 2/5Setup · easy

In one sentence

A tool that scans a local nixpkgs checkout and draws an interactive heatmap showing how packages are distributed across two-letter name prefixes.

Mindmap

mindmap
  root((nixpkgs-stats))
    What it does
      Scans nixpkgs by-name
      Builds prefix heatmap
      Shows commit info
    Tech stack
      Python
      Streamlit
      Plotly
    Use cases
      Visualize package distribution
      Compare nixpkgs versions
      Filter lib packages
    Audience
      Nix package developers
    Setup
      Local nixpkgs checkout
      uv run streamlit

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Visualize how many nixpkgs packages exist under each two-letter name prefix.

USE CASE 2

Compare package counts across different nixpkgs forks, tags, or commits.

USE CASE 3

See how excluding lib-prefixed packages changes the package distribution.

USE CASE 4

Explore package density with an interactive, zoomable heatmap in the browser.

What is it built with?

PythonStreamlitPlotlypandasnumpyGitPython

How does it compare?

arunoruto/nixpkgs-stats0xallam/my-recipe0xhassaan/nn-from-scratch
Stars00
LanguagePythonPythonPython
Last pushed2022-11-22
MaintenanceDormant
Setup difficultyeasymoderatemoderate
Complexity2/52/54/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires a local nixpkgs checkout on disk and the uv Python tool to run the Streamlit app.

No license information is stated in the README.

So what is it?

nixpkgs-stats is a small tool for visualizing how packages are organized inside nixpkgs, the large collection of software packages used by the Nix package manager. Rather than reading through the raw file structure yourself, this tool scans the pkgs/by-name folder of a nixpkgs checkout and turns it into a heatmap, a grid style chart where color shows how many packages fall under each two letter prefix. The first letter of the prefix runs along one axis and the second letter runs along the other, so you can see at a glance which letter combinations have the most packages. You point the tool at any nixpkgs folder you already have on your computer, whether that is a fork, a specific tag, or a particular commit. It shows you the latest commit hash and date of that checkout so you know exactly what version you are looking at. You can choose whether to count each package directory once or to count every individual .nix file instead, and you can switch to a logarithmic color scale, which helps when one prefix has far more packages than the rest and would otherwise wash out the chart. There is also an option to exclude packages that start with lib, since the README notes that filtering these out can significantly change the numbers in that particular prefix. The chart itself is built with Plotly, so it is interactive: you can hover over any cell to see its exact count and zoom in on areas you want to look at more closely. To run it, you use a command that starts a Streamlit web app in your browser. From there you type in the path to your nixpkgs folder, adjust the counting options in the sidebar, and click Scan to generate the heatmap. The tool depends on Streamlit for the interface, Plotly for the chart, pandas and numpy for handling the data, GitPython for reading repository metadata, and Kaleido for exporting static images.

Copy-paste prompts

Prompt 1
Explain how nixpkgs-stats builds its two-letter prefix heatmap from pkgs/by-name.
Prompt 2
Show me how to run nixpkgs-stats with uv and Streamlit against my local nixpkgs checkout.
Prompt 3
Help me understand the difference between counting package directories and counting .nix files here.
Prompt 4
Walk me through what the logarithmic color scale option changes in the heatmap.

Frequently asked questions

What is nixpkgs-stats?

A tool that scans a local nixpkgs checkout and draws an interactive heatmap showing how packages are distributed across two-letter name prefixes.

What language is nixpkgs-stats written in?

Mainly Python. The stack also includes Python, Streamlit, Plotly.

What license does nixpkgs-stats use?

No license information is stated in the README.

How hard is nixpkgs-stats to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is nixpkgs-stats for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.