← Back to Pull requests

Add configurable mirrors for nixpkgs sources and data artifacts #16

Closed
unknown closed this pull request without merging on Aug 22, 2026 21:07 UTC
View on GitHub
unknown unknown commented on Aug 22, 2026 14:13 UTC
Author

This adds optional mirror support for both nixpkgs source trees and the pinned data artifacts used by the fast path.

  • Add fetchTreeArgs, a function that receives a nixpkgs revision and returns the base arguments passed to builtins.fetchTree.

  • Add dataBaseUrl to override the canonical artifact URL from data-pins.json.

  • Preserve the existing GitHub locations as defaults.

  • Document both options, including an Artifactory example.
  • Example:

    mv = multiverse.lib.mkMultiverse {
      system = "x86_64-linux";
    
      fetchTreeArgs = rev: {
        type = "tarball";
        url = "https://artifactory.example.org/artifactory/nixpkgs/archive/${rev}.tar.gz";
      };
    
      dataBaseUrl =
        "https://mirror.example.org/nixpkgs-multiverse/releases/download";
    };
    

    Multiverse adds the selected rev and, for indexed revisions, the recorded narHash to the result of fetchTreeArgs. Pinned data artifacts remain verified using the hashes from data-pins.json.

    Motivation

    Some environments cannot access GitHub directly and require dependencies to be retrieved through an internal mirror such as Artifactory. Previously, the nixpkgs source and pinned artifact locations were effectively fixed to GitHub.

    Testing

    No tests were added for this change.

    A complete integration test would require either:

  • a real mirror containing the expected nixpkgs revisions and pinned artifacts

  • committed mirror fixtures matching the hashes in data-pins.json

  • additional dependency-injection hooks added solely for testing
  • I was unsure whether that additional complexity was justified for these small fetch-configuration changes. Feedback on an appropriate deterministic testing strategy would be welcome.

    That being said, I did test these new features on an enterprise Artifactory instance with a dedicated proxy repository to upstream nixpkgs on GitHub.

    AI assistance disclosure

    The documentation update was produced with assistance from OpenAI Codex using the gpt-5.6-sol model. I reviewed and adjusted the resulting documentation against the implementation before including it.

    Diff: 266 lines (+199 / -67) across 3 files Reviewer: fzakaria Review duration: 414m
    All Vouch review confidence checks passed
    Residual risk 0.26 = Change Risk (0.63) × (1 − Review Confidence (0.58)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.63 · 266 lines diff across 3 files
    0.63
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    57%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.334
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.063
    Real PR Conversation Timeline
    1 comments
    "Review active on #16"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 58.0% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 62.5% (MEDIUM) · Higher = larger blast radius
    62.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 58.0% · Lower = rushed or shallow review
    58.0%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 26.3% · Safe to merge
    26.3%