Skip to content

feat(packaging): consolidate packaging assets and add Nix flake/module - #258

Merged
VallierDev merged 9 commits into
VallierDev:mainfrom
Moraxyc:refactor-packaging-and-add-nix
Nov 20, 2026
Merged

VallierDev merged 9 commits into
VallierDev:mainfrom
Moraxyc:refactor-packaging-and-add-nix

Conversation

@Moraxyc

@Moraxyc Moraxyc commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Summary

添加nix相关打包,使得nixos用户可以更轻松地安装和使用uu-remote-linux。
同时为了减少重复代码,将systemd、udev和desktop相关的文件移动到packaging/common目录下,docker相关文件移动到packaging/docker目录下,规范各发行版打包文件位置。

Assisted-by: Gemini 4 Argon

  • Consolidate shared distribution assets under packaging/common/:
    • Extract packaging/common/systemd/uuremote-native.service.in (@EXEC_START@ template) as the single source of truth for .deb, the tarball installer, the Nix package, and src/viewer/host.rs (include_str!).
    • Extract packaging/common/udev/60-uu-remote-linux-uinput.rules so packaging/deb/build-deb.sh and packaging/nix/package.nix no longer duplicate inline udev rule strings.
    • Move contrib/desktop/ (*.desktop and uu-remote-linux.svg) to packaging/common/desktop/ and update packaging/deb/build-deb.sh, packaging/tarball/install.sh, .github/workflows/{ci,release}.yml, c_engine/assist_window.c, README.md, README.en.md, and AGENTS.md.
  • Move Docker packaging to packaging/docker/:
    • Move docker/{Dockerfile,README.md,compose.yaml} under packaging/docker/ and update .github/workflows/release.yml (context: packaging/docker).
  • Add Nix flake, package, and NixOS module:
    • Add flake.nix (packages.default / packages.uu-remote-linux, overlays.default, nixosModules.default, devShells.default, formatter) and flake.lock.
    • Add packaging/nix/package.nix with feature toggles (withWayland, withPortal, withViewer, withInprocAv) and narrow lib.fileset.toSource.
    • Add packaging/nix/module.nix (services.uu-remote-linux with enable, package, ffmpegPackage, uinput.enable).
    • Document flake.lock manual refresh expectations in AGENTS.md (matching the repo's existing --locked workflow).

@VallierDev

Copy link
Copy Markdown
Owner

感谢!整理打包目录并加 Nix flake/模块的方向很好。初步审查:本地 cargo test --locked 390 个测试通过,CI 全绿;unit 改为单一模板(deb / tarball / host.rs 共用)、udev 规则去重也核对过。

几点小问题:

  • docs/release-notes/v0.2.8.md 里的 blob/main/docker/README.md 链接移动后会失效,可改为 packaging/docker/README.md(或不动历史说明,我们接受)。
  • Nix 包目前不在 CI 里构建,flake.lock 也只能手动刷新;欢迎后续单独加一个 nix flake check job(不阻塞本 PR)。
  • 与 feat(loongarch64): 添加龙芯架构(loongarch64)支持,与 QEMU CI 构建 #257(龙芯)有交叉:它的打包步骤仍拷贝 contrib,后合的一方需要同步 packaging/common。

已请 Codex 审查,返回后再合并。

🤖 Generated with Claude Code

@VallierDev

Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T13:26:46.623196Z fd936fa Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

**部署和使用步骤见 [docs/deploy-nas-docker.md](../docs/deploy-nas-docker.md)。**

P3 Badge Fix the deployment links in the relocated Docker README

After moving this README into packaging/docker, both ../docs/deploy-nas-docker.md links resolve under packaging/docs. A repository-wide rg --files search finds the deployment guide only at docs/deploy-nas-docker.md. Update both language sections to use ../../docs/deploy-nas-docker.md, preserving the English anchor, so readers can reach the deployment and first-login instructions.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packaging/nix/package.nix Resolved
Comment thread flake.nix Resolved
Comment thread packaging/nix/module.nix Resolved
@VallierDev

Copy link
Copy Markdown
Owner

感谢快速跟进!新提交已核对:host 改为 libexec 下保留原名的二进制 + 带 ffmpeg-full 的包装器(doctor/show 按可执行文件名识别不受影响)、UU_FFMPEG_ROOT 默认 null 且环境变量过滤 null(不再挡住 inproc-av)、中英文 README 补了 Nix 安装说明、docker README 链接已修正。CI 全绿。

再请 Codex 复审一次新提交,返回无问题后合并。

@codex review

🤖 Generated with Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f1a8c50bb5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packaging/nix/package.nix Resolved
Comment thread packaging/nix/package.nix Resolved
Comment thread README.en.md Resolved
@VallierDev

Copy link
Copy Markdown
Owner

Codex 对 f1a8c50 的复审返回 3 条 P2,已逐条核对源码,均成立:

  1. wl-clipboard:src/clipboard.rs 的 Wayland 剪贴板启动时探测 wl-copy/wl-paste,缺任一就 ready=false。Wayland(Hyprland)构建建议把 wl-clipboard 加进 host 包装器的 PATH。
  2. NVENC 驱动库:c_engine/nvenc_engine.c 按 soname dlopen("libcuda.so.1") / libnvidia-encode.so.1,这两个只在 NixOS 的 /run/opengl-driver/lib;withInprocAv 时请把该目录加进 RUNPATH(如 addDriverRunpath),否则进程内 NVENC 初始化失败只能回退。
  3. README 独立安装步骤:Nix 独立安装路线引用的第 3/4 步是 ./target/release/uuremote-server 和拷贝 Cargo 产物的 unit,对 nix profile install 用户不适用;请给 Nix 路线单独写登录命令(uuremote-server login)和 unit 的 ExecStart(或说明用包内 share/systemd/user 的 unit),中英两份同步。

修完后我再请一次复审,无问题即合并。谢谢!

🤖 Generated with Claude Code

@VallierDev

Copy link
Copy Markdown
Owner

感谢跟进!新提交已核对,三条 P2 均已处理:

  • Wayland 构建在 host/viewer 包装器 PATH 中加入 wl-clipboard;
  • withInprocAv 时对 host 二进制执行 addDriverRunpath(并补了 libva 构建输入);
  • 中英 README 的 Nix 独立安装改为 uuremote-server login + ExecStart=%h/.nix-profile/bin/uuremote-server 的用户服务。

另外新增的 NixOS VM 测试(nix flake check)也看过。CI 全绿,再请 Codex 复审新头,返回无问题后合并。

@codex review

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: fd936fa3f4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@VallierDev
VallierDev merged commit 1f01bad into VallierDev:main Nov 20, 2026
6 checks passed
@VallierDev

Copy link
Copy Markdown
Owner

已 squash 合并(1f01bad),感谢 @Moraxyc 的打包整合与 Nix flake/模块,以及按审查意见的多轮修改!将随下一个版本发布。

🤖 Generated with Claude Code

@Moraxyc
Moraxyc deleted the refactor-packaging-and-add-nix branch November 20, 2026 14:26
mujianwu added a commit to mujianwu/uu-remote-linux that referenced this pull request Nov 20, 2026
packaging/common exists on main since VallierDev#258 moved the desktop entries and the
systemd unit template there, so the transitional directory check can go and
the staging steps match release.yml exactly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants