whatisgithub

What is override-utils?

gabriella439/override-utils — explained in plain English

Analysis updated 2026-06-24

28NixAudience · developerComplexity · 2/5Setup · moderate

In one sentence

A Nix library that makes it much simpler to customize how packages are built, replacing deeply nested boilerplate with named operations like set, add, append, and modify.

Mindmap

mindmap
  root((repo))
    What it does
      Simplifies overrides
      Named operations
      Safe value merging
    Operations
      set and add
      append and prefix
      modify and transform
    Compatibility
      Nix flakes
      Non-flake Nix
    Audience
      Nix users
      Package maintainers
Click or tap to explore — scroll the page freely

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

Add a patch to a Nixpkgs package in a single line instead of writing nested override expressions.

USE CASE 2

Safely merge nested attribute values when customizing package builds without erasing unrelated settings.

USE CASE 3

Apply the same transformation to every key in a Nix attribute set at once for bulk package customization.

USE CASE 4

Combine multiple override operations for complex package customizations while keeping the code readable.

What is it built with?

Nix

How does it compare?

gabriella439/override-utilsthang1191/mikuplymouthandrewrk/nixpkgs
Stars28221
LanguageNixNixNix
Last pushed2023-10-26
MaintenanceDormant
Setup difficultymoderatemoderatemoderate
Complexity2/52/54/5
Audiencedevelopergeneraldeveloper

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

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires familiarity with Nix and either the flakes system or the older non-flake setup, no external dependencies needed.

No license information was mentioned in the explanation.

So what is it?

Nix is a package manager that uses a special configuration language to describe software builds. One of its core features is the ability to customize how packages are built by writing "overrides," which are instructions that change specific settings for a package without rewriting its entire definition. In practice, writing these overrides the standard Nix way requires a lot of repetitive, nested code that is easy to get wrong. This project, override-utils, provides a simpler way to write those customizations. Instead of writing deeply nested attribute merges by hand, you use a small set of named operations like set, add, append, prefix, and modify to describe what should change. The library figures out the rest, including how to merge nested values safely without accidentally erasing unrelated settings. For example, if you want to add a patch to one package in the Nixpkgs collection, the standard approach requires several layers of nested expressions. With override-utils, the same change takes a single line using the append operation on the patches attribute. The library also handles cases where an attribute might not exist yet, applying a sensible default instead of throwing an error. The project works with both the newer Nix flakes system and the older non-flake setup. It is written entirely in Nix with no external dependencies. The README includes a detailed tutorial covering all supported operations, including how to target specific items in a list, how to transform every key in a set at once, and how all features can be combined for complex customizations. The author also links to a blog post with additional context about why Nixpkgs overrides are difficult to work with in the first place.

Copy-paste prompts

Prompt 1
I use Nix and want to add a patch to a Nixpkgs package, show me how to do it with override-utils append instead of the standard nested override syntax.
Prompt 2
How do I use override-utils modify to change a single build flag in a Nixpkgs package without touching its other settings?
Prompt 3
Set up override-utils in a Nix flake so I can use it across all my package customizations in flake.nix.

Frequently asked questions

What is override-utils?

A Nix library that makes it much simpler to customize how packages are built, replacing deeply nested boilerplate with named operations like set, add, append, and modify.

What language is override-utils written in?

Mainly Nix. The stack also includes Nix.

What license does override-utils use?

No license information was mentioned in the explanation.

How hard is override-utils to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is override-utils for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.