Skip to content
vic

cachix/devenv-nixpkgs

Tested nixpkgs pins that work with devenv

cachix/devenv-nixpkgs.json
{
"createdAt": "2024-03-03T11:51:40Z",
"defaultBranch": "main",
"description": "Tested nixpkgs pins that work with devenv",
"fullName": "cachix/devenv-nixpkgs",
"homepage": null,
"language": "Python",
"name": "devenv-nixpkgs",
"pushedAt": "2026-01-19T16:42:05Z",
"stargazersCount": 24,
"topics": [],
"updatedAt": "2026-01-19T16:42:22Z",
"url": "https://github.com/cachix/devenv-nixpkgs"
}

Battle-tested nixpkgs using devenv’s extensive testing infrastructure.

Currently, the only supported release is rolling.

Rolling is based on nixpkgs-unstable plus any patches that improve the integrations and services offered by devenv.

In your devenv.yaml:

inputs:
nixpkgs:
url: github:cachix/devenv-nixpkgs/rolling
flake: false

Patches are defined in [patches/default.nix]!(./patches/default.nix) with two categories:

  • upstream: Patches fetched from open nixpkgs PRs via fetchpatch (self-tracking)
  • local: Patches not yet submitted upstream

For patches with an open nixpkgs PR:

patches/default.nix
upstream = [
(fetchpatch {
name = "fix-python-darwin.patch";
url = "https://github.com/NixOS/nixpkgs/pull/12345.patch";
sha256 = "sha256-AAAA...";
})
];

When the PR is merged, the hash changes and the build fails, signaling removal.

For patches not yet submitted upstream:

  1. Create your patch in a nixpkgs checkout:

    Terminal window
    git format-patch -1 HEAD -o /path/to/devenv-nixpkgs/patches/
  2. Add it to patches/default.nix:

    local = [
    ./001-fix-something.patch
    ];

Test patches before pushing:

Terminal window
# Build a package with patches applied
nix build .#legacyPackages.x86_64-linux.hello
# Or enter a shell
nix develop

For package-level fixes that don’t require source patches, use [overlays/default.nix]!(./overlays/default.nix):

[
(final: prev: {
somePackage = prev.somePackage.overrideAttrs (old: {
patches = old.patches or [] ++ [ ./fix.patch ];
});
})
]

Overlays are more resilient to upstream changes than source patches.

Latest test results from devenv’s comprehensive test suite:

Status: ❌ Some tests failing

Nixpkgs revision: 7ab75bb

Test run: View detailed results

Last updated: 2026-01-19 16:42:04 UTC

PlatformTests Failed/TotalSuccess Rate
aarch64-linux0/00.0%
x86_64-linux0/00.0%
aarch64-darwin0/00.0%
x86_64-darwin0/00.0%
  • Total test jobs: 153
  • Successful: 92 ✅
  • Failed: 58 ❌
  • Success rate: 60%
  1. flake.nix imports nixpkgs-unstable and applies patches at evaluation time
  2. flake.lock pins the exact nixpkgs revision
  3. CI runs weekly to update, test, and create release PRs
  • main: development branch, receives weekly nixpkgs updates
  • rolling: stable release, promoted from main via PR

Every Monday at 9:00 UTC (or manually triggered):

  1. Update: nix flake update pulls latest nixpkgs-unstable
  2. Validate: Build a test package to verify patches apply
  3. Push: Commit updated flake.lock to main
  4. Test: Run devenv test suite across all platforms
  5. Summary: Update README with test results
  6. Release PR: Create PR to promote mainrolling

Test locally:

Terminal window
nix flake update
nix build .#legacyPackages.x86_64-linux.hello

Trigger CI manually:

Terminal window
gh workflow run "Update and test"

After tests pass, a PR is automatically created to promote mainrolling. Merge the PR to release.