feat: add Nix flake for reproducible builds via uv2nix#234
Open
Sunny-XXV wants to merge 2 commits into
Open
Conversation
Provides:
- packages.<system>.{default,bub}: bub CLI built from uv.lock (uv2nix, wheel-preferred)
- apps.default: nix run .#bub
- devShells.default (uv) and .locked (pure, from lockfile)
- overlays.default for NixOS / home-manager consumption
Version and Python interpreter are derived from pyproject.toml and
requires-python, not hardcoded.
devShells.default now builds a Nix virtualenv with the local bub installed editable plus the dev/optional dependency groups (deps.all), and symlinks it to ./.venv on shell entry so editors and 'uv run' pick up .venv/bin/python. Editing src/bub/ is reflected live.
Author
|
稍等下,有些 skill 里面的 python script 的依赖是声明在文件开头,依赖 uv 解析的,现在的 flake 可能没法覆盖到这种情况。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi 开发者,我是 Nix & NixOS 用户,我尝试为这个项目添加了一个 flake,来方便操作系统环境和我类似的用户。
这个 flake 很简单,基于 uv2nix,所以基本信息大部分都是从项目已有的 pyproject.toml 和 uv.lock 获取的,理论上不需要频繁更新。
可能需要讨论的点: