Skip to content

Feature: Support NixOS#2132

Merged
t8y2 merged 2 commits into
t8y2:mainfrom
juvevood:feature-nixos-support
Jun 30, 2026
Merged

Feature: Support NixOS#2132
t8y2 merged 2 commits into
t8y2:mainfrom
juvevood:feature-nixos-support

Conversation

@juvevood

@juvevood juvevood commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

变更说明

支持NixOS

变更类型

NixOS系统打包支持,不涉及dbx项目本身功能的更改。

涉及前端

验证

在NixOS系统的dbx项目根目录执行:nix build .#dbx-desktop

已验证成功编译。
已验证项目运行正常。

关联 Issue

@t8y2

t8y2 commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Thanks for adding Nix/NixOS support. A root-level flake.nix makes sense if DBX wants to officially support Nix users.

I don't think this should be merged as-is yet. The main issue is the dbx-web package: the flake tries to skip default Cargo features with cargoExtraArgs = "--no-default-features", but buildRustPackage does not consume that field. The supported field is buildNoDefaultFeatures = true;.

Also, even with cargo build -p dbx-web --no-default-features, dbx-core default features are still enabled because crates/dbx-web/Cargo.toml depends on dbx-core without default-features = false. That still pulls in duckdb-bundled, so the current comment/config about skipping DuckDB is misleading.

Could you either:

  1. remove the dbx-web package from this PR and keep the scope to dbx-desktop, or
  2. fix the Cargo feature wiring and Nix build fields so dbx-web actually builds without DuckDB?

It would also be helpful to add a Nix validation step, such as nix flake check or nix build .#dbx-desktop, otherwise this new packaging path can regress without CI coverage.

@t8y2 t8y2 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for adding Nix/NixOS support. A root-level flake.nix makes sense if DBX wants to officially support Nix users.

I don't think this should be merged as-is yet. The main issue is the dbx-web package: the flake tries to skip default Cargo features with cargoExtraArgs = "--no-default-features", but buildRustPackage does not consume that field. The supported field is buildNoDefaultFeatures = true;.

Also, even with cargo build -p dbx-web --no-default-features, dbx-core default features are still enabled because crates/dbx-web/Cargo.toml depends on dbx-core without default-features = false. That still pulls in duckdb-bundled, so the current comment/config about skipping DuckDB is misleading.

Could you either:

  1. remove the dbx-web package from this PR and keep the scope to dbx-desktop, or
  2. fix the Cargo feature wiring and Nix build fields so dbx-web actually builds without DuckDB?

It would also be helpful to add a Nix validation step, such as nix flake check or nix build .#dbx-desktop, otherwise this new packaging path can regress without CI coverage.

@juvevood

Copy link
Copy Markdown
Contributor Author

Thanks for adding Nix/NixOS support. A root-level flake.nix makes sense if DBX wants to officially support Nix users.

I don't think this should be merged as-is yet. The main issue is the dbx-web package: the flake tries to skip default Cargo features with cargoExtraArgs = "--no-default-features", but buildRustPackage does not consume that field. The supported field is buildNoDefaultFeatures = true;.

Also, even with cargo build -p dbx-web --no-default-features, dbx-core default features are still enabled because crates/dbx-web/Cargo.toml depends on dbx-core without default-features = false. That still pulls in duckdb-bundled, so the current comment/config about skipping DuckDB is misleading.

Could you either:

  1. remove the dbx-web package from this PR and keep the scope to dbx-desktop, or
  2. fix the Cargo feature wiring and Nix build fields so dbx-web actually builds without DuckDB?

It would also be helpful to add a Nix validation step, such as nix flake check or nix build .#dbx-desktop, otherwise this new packaging path can regress without CI coverage.

Thanks for your attention and feedback. allright, i removed dbx-web. its unnecessary.

@juvevood juvevood requested a review from t8y2 June 30, 2026 06:43
@t8y2 t8y2 merged commit 894ef0c into t8y2:main Jun 30, 2026
7 checks passed
@t8y2

t8y2 commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Thanks for the contribution! Merged in 894ef0c, will be released in the next version.

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