NixCon 2025

Applying Graph2Diff neural repair to build errors in nixpkgs
2025-09-06 , Lecture Hall

This talk is a progress report on my senior thesis, not a finished case study.

Build failures drain CI and human resources, and nixpkgs exacerbates the challenge due to its mix of languages and build systems. BuildMedic (SANER, 2018) addresses dependency issues in Maven, and graph neural networks were tested at Graph2Diff (ICSEW, 2020). However, no analogous tool yet exists for Nix, where r-ryantm updates dependencies but rarely pinpoints the root cause.

I am adapting the Graph2Diff approach to nixpkgs by harvesting failure-fix pull request (PR) pairs and extracting abstract syntax trees (ASTs) and build logs. The roadmap covers:
1. Dataset creation,
2. model design; and
3. a workflow in which the GNN proposes edits.

While it is possible to have an LLM perform repairs, in a large repository such as nixpkgs, the cost is significant and cannot be ignored. My goal is to incorporate automatic repairs into nixpkgs in a way that will make them feasible in the future and reduce the burden on maintainers.