# Patch nixpkgs using cherry-picks without local clone

**URL:** https://discourse.nixos.org/t/patch-nixpkgs-using-cherry-picks-without-local-clone/76925
**Category:** Announcements
**Created:** [April 8, 2026, 6:34pm UTC](https://discourse.nixos.org/t/patch-nixpkgs-using-cherry-picks-without-local-clone/76925 "2026-04-08T18:34:24Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![toastal](https://discourse.nixos.org/user_avatar/discourse.nixos.org/toastal/32/3454_2.png) [@toastal](https://discourse.nixos.org/u/toastal)
#### Post date: [April 9, 2026, 10:57pm UTC](https://discourse.nixos.org/t/patch-nixpkgs-using-cherry-picks-without-local-clone/76925/3 "2026-04-09T22:57:16Z")

</div>

[Nixtamal](https://nixtamal.toast.al/) supports patches generically patching any input with a diff/patch file (local or remote reference supported) while also not requiring flakes or giving proprietary Microsoft GitHub any special privilege tool or syntax (like `Someone/nixpkgs@pr-branch`).

```kdl
version "1.0.0"
patches {
	// Unique name for referencing in manifest inputs
	chroma-0.22.0 "https://patch-diff.githubusercontent.com/raw/NixOS/nixpkgs/pull/478519.patch" {
		// Optionally override the project default hash algorithm for the patch
		hash algorithm=SHA-512 expected="1mdsfx204bgia572fydnmjy78dkybbcnjx20qn9l4q65r29ry28c"
	}
}
// Define inputs
inputs {
	// Unique name for referencing in Nix
	nixpkgs {
		// Fetch an archive with string templating support
		archive {
			url "https://github.com/NixOS/nixpkgs/archive/{{fresh_value}}.tar.gz"
		}
		hash algorithm=SHA-256
		// Apply patches to the source now while awaiting review
		patches chroma-0.22.0
		fresh-cmd {
			$ git ls-remote --branches "https://github.com/NixOS/nixpkgs.git" --refs nixpkgs-unstable
			| cut -f1
		}
	}
}

```

Which generates a lockfile + shim that allows users to.

```nix
let
   inputs = import nix/tamal { };
   pkgs = import inputs.nixpkgs { };
in
pkgs.chroma

```

Since the patch URL points to a pull request, next time you run `nixtamal refresh` you can get the new patches as it goes thru review. But just as easily you could point to each commit individually if preferred. Patches are just `pkgs.applyPatches` under the hood.

---

_[View the full topic](https://discourse.nixos.org/t/patch-nixpkgs-using-cherry-picks-without-local-clone/76925)._
