uv2nix

Convert uv workspaces into Nix derivations for reproducible Python builds.

21|Updated Jan 5, 2024
One-click install
npx skills add https://github.com/olafkfreund/nixos_config --skill uv2nix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: uv2nix
Source: https://github.com/olafkfreund/nixos_config/tree/main/.gemini/skills/uv2nix
Command: npx skills add https://github.com/olafkfreund/nixos_config --skill uv2nix

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

uv2nix automates turning uv-based Python project workspaces into deterministic Nix derivations, enabling reproducible builds and deployments.

Core Features & Use Cases

  • Workspace to derivations: Generate Nix expressions for all projects inside a uv workspace.
  • Monorepo support: Handle multi-package repos with shared dependencies.
  • Nix + Python tooling integration: Works with pyproject-nix, Nix flakes, and Python packaging standards.

Quick Start

From the workspace root, run uv2nix to generate default.nix and workspace derivations, then build with nix build.

Frequently Asked Questions about uv2nix

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a uv workspace to Nix derivations for reproducible Python builds?

To convert a uv workspace to Nix derivations, run uv2nix from the workspace root to generate default.nix and workspace derivations, then build with nix build. This enables reproducible Python builds across environments.

Can I use Nix derivations to manage dependencies in a Python monorepo?

Yes, Nix derivations can manage dependencies in a Python monorepo. uv2nix provides monorepo support by handling multi-package repos with shared dependencies and generating Nix expressions for all projects inside the uv workspace.

What tools do I need to generate Nix expressions from uv-based Python projects?

To generate Nix expressions from uv-based Python projects, you need uv, uv2nix, and Nix/NixOS tooling, along with pyproject-nix for PyPI-like packaging. These tools work together to enable deterministic Python builds.

Does uv2nix work with pyproject-nix and Python packaging standards?

Yes, uv2nix works with pyproject-nix, Nix flakes, and Python packaging standards. This integration enables automatic derivation generation for UV-based Python projects and monorepos across different environments.

Why should I use Nix derivations instead of standard uv environments for Python deployment?

You should use Nix derivations instead of standard uv environments to achieve deterministic, reproducible builds and deployments. uv2nix automates turning uv-based Python project workspaces into these Nix derivations for consistent environments.