Skip to content

Comments

voxtype,voxtype-{vulkan,onnx}: init at 0.6.2#491124

Draft
DuskyElf wants to merge 1 commit intoNixOS:masterfrom
DuskyElf:voxtype
Draft

voxtype,voxtype-{vulkan,onnx}: init at 0.6.2#491124
DuskyElf wants to merge 1 commit intoNixOS:masterfrom
DuskyElf:voxtype

Conversation

@DuskyElf
Copy link
Member

@DuskyElf DuskyElf commented Feb 16, 2026

https://voxtype.io : Voice-to-text with push-to-talk, integrates nicely with Wayland compositors
repo: https://github.com/peteonrails/voxtype

Added 3 packages

  • voxtype
  • voxtype-vulkan
  • voxtype-onnx

CUDA and ROCm packages could be added later (I don't have a way to test them yet).

References used

The current release of the upstream doesn't support MacOS

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Copilot AI review requested due to automatic review settings February 16, 2026 19:34
@DuskyElf
Copy link
Member Author

Replaces: #480335 & #478040

@DuskyElf
Copy link
Member Author

@delafthi can you please review it? I'm new to packaging

@nixpkgs-ci nixpkgs-ci bot added 8.has: package (new) This PR adds a new package 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. labels Feb 16, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds three package variants of voxtype, a voice-to-text application with push-to-talk support for Wayland compositors. The package supports CPU-only and Vulkan-accelerated modes through different build features.

Changes:

  • Added voxtype package with configurable acceleration support (CPU or Vulkan)
  • Added voxtype-cpu and voxtype-vulkan variants in all-packages.nix
  • Referenced ollama package structure for handling acceleration variants

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
pkgs/by-name/vo/voxtype/package.nix Main package definition with acceleration parameter support for CPU and Vulkan modes
pkgs/top-level/all-packages.nix Adds explicit variant definitions for voxtype-cpu and voxtype-vulkan

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nixpkgs-ci nixpkgs-ci bot added the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Feb 16, 2026
@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Feb 16, 2026
@DuskyElf
Copy link
Member Author

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 491124
Commit: 90ca35a06d361e27cac07d8562d9517e7bc4bea3 (subsequent changes)
Merge: bfa17e751ad1e18d17fc0a9cf88aeb5766e5c501

Logs: https://github.com/DuskyElf/nixpkgs-review-gha/actions/runs/22075697975


x86_64-linux

❌ 1 package failed to build:
  • voxtype-vulkan
✅ 1 package built:
  • voxtype (voxtype-cpu)

Error logs: `x86_64-linux`
voxtype-vulkan
        |                                                                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
        |                                                                                                          conv2d_f16_f32_data
  /build/source/target/x86_64-unknown-linux-gnu/release/build/whisper-rs-sys-4c8fa4213319674a/out/whisper.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp:3244:71: error: 'conv2d_f32_len' was not declared in this scope; did you mean 'conv2d_f16_f32_len'?
   3244 |                 device, device->pipeline_conv2d_f32[s], "conv2d_f32", conv2d_f32_len, conv2d_f32_data, "main", 3,
        |                                                                       ^~~~~~~~~~~~~~
        |                                                                       conv2d_f16_f32_len
  /build/source/target/x86_64-unknown-linux-gnu/release/build/whisper-rs-sys-4c8fa4213319674a/out/whisper.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp:3244:87: error: 'conv2d_f32_data' was not declared in this scope; did you mean 'conv2d_f16_f32_data'?
   3244 |                 device, device->pipeline_conv2d_f32[s], "conv2d_f32", conv2d_f32_len, conv2d_f32_data, "main", 3,
        |                                                                                       ^~~~~~~~~~~~~~~
        |                                                                                       conv2d_f16_f32_data
  make[2]: *** [ggml/src/ggml-vulkan/CMakeFiles/ggml-vulkan.dir/build.make:219: ggml/src/ggml-vulkan/CMakeFiles/ggml-vulkan.dir/ggml-vulkan.cpp.o] Error 1
  make[1]: *** [CMakeFiles/Makefile2:304: ggml/src/ggml-vulkan/CMakeFiles/ggml-vulkan.dir/all] Error 2
  make: *** [Makefile:139: all] Error 2

thread 'main' (2086) panicked at /build/voxtype-0.5.6-vendor/cmake-0.1.54/src/lib.rs:1119:5:

command did not execute successfully, got: exit status: 2

build script failed, must exit now
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace


aarch64-linux

✅ 2 packages built:
  • voxtype (voxtype-cpu)
  • voxtype-vulkan

x86_64-darwin

No rebuilds


aarch64-darwin

No rebuilds

@DuskyElf
Copy link
Member Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 491124
Commit: 90ca35a06d361e27cac07d8562d9517e7bc4bea3


x86_64-linux

✅ 2 packages built:
  • voxtype (voxtype-cpu)
  • voxtype-vulkan

@DuskyElf
Copy link
Member Author

How come it builds fine locally but not on github actions via nixpkgs-review-gha ?

@DuskyElf DuskyElf closed this Feb 16, 2026
@DuskyElf DuskyElf reopened this Feb 16, 2026
@delafthi
Copy link
Contributor

@delafthi can you please review it? I'm new to packaging

I had a quick look and at first glance it seems good. I'll review it tomorrow.

@delafthi
Copy link
Contributor

delafthi commented Feb 16, 2026

How come it builds fine locally but not on github actions via nixpkgs-review-gha ?

I'm not sure but does vulkan stuff depend on hardware (gpus)? That might not be available on the action runners. Probably not - I see you have all the vulkan stuff. I'll have a look tomorrow.

@DuskyElf
Copy link
Member Author

DuskyElf commented Feb 16, 2026

does vulkan stuff depend on hardware (gpus)?

I believe it shouldn't depend at build time ...
Also the aarch64 package built fine even on Github runners

@leiserfg
Copy link
Contributor

I'm not sure but does vulkan stuff depend on hardware (gpus)?

Vulkan has two parts, this links against the interface, the runtime is loaded dynamically. So this is fine.

By the way, 0.6.0 is out.

@leiserfg
Copy link
Contributor

I'm not sure if this should include wtype and wl-clipboard, as they are only useful in some DM, the tool itself has many other backends, and they are all taken from PATH. IMHO it's better to leave that to the final user.

Copy link
Contributor

@delafthi delafthi left a comment

Choose a reason for hiding this comment

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

About the issue with CI/nixpkgs-review-gha. The build fails when compiling whisper-cpp. I had a look at the package declaration in nixpkgs and there is this:

++ optionals (isx86 && !isStatic) [
(cmakeBool "GGML_BACKEND_DL" true)
(cmakeBool "GGML_CPU_ALL_VARIANTS" true)
(cmakeFeature "GGML_BACKEND_DIR" "${placeholder "out"}/lib")
]

Maybe we're hitting that on GHA runners.

vulkan-loader,

# one of `[ null false "vulkan" ]`
acceleration ? null,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I would rather go with:

Suggested change
acceleration ? null,
vulkanSupport ? false,
<packages for vulkanSupport>
rocmSupport ? false,
<packages for rocmSupport>
cudaSupport ? false,
<packages for cudaSupport>

(This is just a suggestion - just add the acceleration you want to support.)

This seems to be a common pattern ( see https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/python-modules/torch/source/default.nix or https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/wh/whisper-cpp/package.nix)

Copy link
Member Author

Choose a reason for hiding this comment

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

I saw that acceleration pattern in ollama here -

# one of `[ null false "rocm" "cuda" "vulkan" ]`
acceleration ? null,

Comment on lines 29 to 33
assert builtins.elem acceleration [
null
false
"vulkan"
];
Copy link
Contributor

Choose a reason for hiding this comment

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

Change the asserts accordingly. I'm not sure if only one of the acc-backend features can be enabled. Maybe all of them can be enabled - then you could just remove the assert.

Comment on lines 3609 to 3610
voxtype-cpu = callPackage ../by-name/vo/voxtype/package.nix { acceleration = false; };
voxtype-vulkan = callPackage ../by-name/vo/voxtype/package.nix { acceleration = "vulkan"; };
Copy link
Contributor

@delafthi delafthi Feb 17, 2026

Choose a reason for hiding this comment

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

Also the naming <package>With<feature> seems to be common. I would change to that.

Suggested change
voxtype-cpu = callPackage ../by-name/vo/voxtype/package.nix { acceleration = false; };
voxtype-vulkan = callPackage ../by-name/vo/voxtype/package.nix { acceleration = "vulkan"; };
voxtypeWithVulkan = callPackage ../by-name/vo/voxtype/package.nix { vulkanSupport = true; };

Though whisper-cpp uses the dash version, ollama as well 🙈

Comment on lines 91 to 92
"Voice-to-text with push-to-talk for Wayland compositors"
+ lib.optionalString vulkanEnabled ", using Vulkan for generic GPU acceleration";
Copy link
Contributor

Choose a reason for hiding this comment

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

I would just have a single description without the optional part.

cmake
clang
pkg-config
makeWrapper
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use makeBinaryWrapper.

https://nixos.org/manual/nixpkgs/stable/#fun-makeWrapper

Using the makeBinaryWrapper implementation is usually preferred, as it creates a tiny compiled wrapper executable, that ...

Copy link
Member Author

Choose a reason for hiding this comment

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

It uses wrapProgram and not makeWapper, and it needs those extra --prefix argument

Copy link
Contributor

Choose a reason for hiding this comment

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

makeBinaryWrapper also provides wrapProgram. Just include makeBinaryWrapper in nativeBuildInputs - you don't have to change anything in your postInstall hook.

@delafthi
Copy link
Contributor

delafthi commented Feb 17, 2026

I'm not sure if this should include wtype and wl-clipboard, as they are only useful in some DM, the tool itself has many other backends, and they are all taken from PATH. IMHO it's better to leave that to the final user.

I agree, this seems unflexible. A possible solution would be to have a waylandPackages option as argument which defaults to the packages suggested by voxtype, but allows the user to override them using voxtype.override { waylandPackages = [...]}. Another solution would be to leave that to a configuration module (nixpkgs or home-manager).

@leiserfg
Copy link
Contributor

leiserfg commented Feb 17, 2026

Another solution would be to leave that to a configuration module (nixpkgs or home-manager).

I think this is the best option.

@DuskyElf
Copy link
Member Author

About the issue with CI/nixpkgs-review-gha. The build fails when compiling whisper-cpp. I had a look at the package declaration in nixpkgs and there is this:

++ optionals (isx86 && !isStatic) [
(cmakeBool "GGML_BACKEND_DL" true)
(cmakeBool "GGML_CPU_ALL_VARIANTS" true)
(cmakeFeature "GGML_BACKEND_DIR" "${placeholder "out"}/lib")
]

Maybe we're hitting that on GHA runners.

What possible fixes are there for us?

@nbCloud91
Copy link
Contributor

nbCloud91 commented Feb 17, 2026

0.6.0 added a lot of new binaries, and you can see this open PR by the creator to bring those to the upstream flake.nix

@leiserfg
Copy link
Contributor

What possible fixes are there for us?

Doing the same here should work.

@leiserfg
Copy link
Contributor

leiserfg commented Feb 17, 2026

6.0.0 added a lot of new binaries and you can see this open PR by the creator to bring those to the upstream flake.nix

I think to avoid blowing up the amount of packages/builds keeping only no gpu / vulkan packages and having the other as optional attributes. That will limit the package to be whisper only (unless recompiled) but if someone wanna try they can always override.

@DuskyElf
Copy link
Member Author

6.0.0 added a lot of new binaries and you can see this open PR by the creator to bring those to the upstream flake.nix

I think to avoid blowing up the amount of packages/builds keeping only no gpu / vulkan packages and having the other as optional attributes. That will limit the package to be whisper only (unless recompiled) but if someone wanna try they can always override.

alright, that makes sense

@DuskyElf
Copy link
Member Author

What possible fixes are there for us?

Doing the same here should work.

Can you please clarify -- doing what? --, I'm unable to understand

@delafthi
Copy link
Contributor

delafthi commented Feb 17, 2026

What possible fixes are there for us?

Doing the same here should work.

Can you please clarify -- doing what? --, I'm unable to understand

Setting the cmake variables I marked or maybe just adding whisper-cpp as buildInput. Though, I'm not sure if cargo will pick that up.

Though, I'm not exactly sure how to achieve that.

Edit: A look into the CMakeLists.txt documentation of whisper-cpp indicates that the previously mentioned CMake options are not applicable to this issue.

@delafthi
Copy link
Contributor

@DuskyElf Maybe that will help: https://codeberg.org/tazz4843/whisper-rs#troubleshooting

  • I get a panic during binding generation build!
    • You can attempt to fix it yourself, or you can set the WHISPER_DONT_GENERATE_BINDINGS environment variable.
      This skips attempting to build the bindings whatsoever and copies the existing ones. They may be out of date, but it's better than nothing.
      • WHISPER_DONT_GENERATE_BINDINGS=1 cargo build

@DuskyElf DuskyElf marked this pull request as draft February 19, 2026 02:34
@peteonrails
Copy link

peteonrails commented Feb 19, 2026

Hi! 👋

I am the upstream maintainer of voxtype, and I feel like I might be creating more problems than I'm solving for NixOS users. I know very little about packaging and publishing for NixOS. Would y'all be open to a discussion on a strategy going forward for me to not cause you a lot of work when new releases are published?

By way of example, I've opened a PR to add @DuskyElf as a code owner on the NixOS packaging files in the voxtype repo (peteonrails/voxtype#226). Would it be useful for you to have collaborator access to the repo so you can help keep the in-repo flake and the nixpkgs package in sync without needing a review from me?

A couple of notes on the PR:

  • The current release is v0.6.2 (this PR targets v0.5.6)
  • Since v0.5.6, we added meeting mode, SenseVoice, and several other ONNX engines alongside Parakeet
  • The flake now derives its version from Cargo.toml instead of hardcoding it

Happy to help with anything you need for the nixpkgs packaging, and happy to figure out how best to work together.

@DuskyElf
Copy link
Member Author

Hi @peteonrails,

Thanks for reaching out, I’m happy to collaborate. I’m also new to nixpkgs packaging. A discussion sounds great such that we keep both the flake.nix (of the upstream) and nixpkgs package (here) in sync with the releases.

I use Voxtype daily with my Wayland compositor and it’s been really helpful. I haven’t tried the newer features (like meeting mode) yet, but I’ll test them soon.

Welcome to nixpkgs, and thanks again for the great project!

@delafthi
Copy link
Contributor

@peteonrails I don’t think you’re making things difficult for the packagers - it’s perfectly normal for a fast-moving package to undergo frequent changes that require more effort to maintain downstream.

@delafthi
Copy link
Contributor

@DuskyElf have a look at #492111 I created a derivation based on the existing one at peteonrails/voxtype. Feel free to take wathever you need into this PR. I'll close it when this has been merged. I just tested the build and not the binary.

Would be nice to also support cuda/rocm and darwin platforms in the future.

@DuskyElf DuskyElf changed the title voxtype,voxtype-{cpu,vulkan}: init at 0.5.6 voxtype,voxtype-{vulkan,onnx}: init at 0.6.2 Feb 21, 2026
@DuskyElf
Copy link
Member Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review


x86_64-linux

❌ 1 package failed to build:
  • voxtype-vulkan
✅ 2 packages built:
  • voxtype
  • voxtype-onnx

error building voxtype-vulkan -

CMake Error at /nix/store/lxkvigfj5xy6w2bs7h4xwr3d7wb7piqb-cmake-4.1.2/share/cmake-4.1/Modules/FindPackageHandleStandardArgs.cmake:227 (message):
  Could NOT find Vulkan (missing: glslc) (found version "1.4.335")

glslc is the shaderc package

@DuskyElf
Copy link
Member Author

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 491124
Commit: d4480a5689704cfe8f6182428cdd9f84fa1825f5 (subsequent changes)
Merge: 22fc83aae9f7808e5ca1882aa556c3a2bea3b331

Logs: https://github.com/DuskyElf/nixpkgs-review-gha/actions/runs/22261314297


x86_64-linux

✅ 3 packages built:
  • voxtype
  • voxtype-onnx
  • voxtype-vulkan

aarch64-linux

❌ 2 packages failed to build:
  • voxtype
  • voxtype-onnx
✅ 1 package built:
  • voxtype-vulkan

Error logs: `aarch64-linux`
voxtype
test text::tests::test_spoken_punctuation_case_insensitive ... ok
test text::tests::test_spoken_punctuation_multi_word ... ok

failures:

---- output::post_process::tests::test_whitespace_trimming stdout ----

thread 'output::post_process::tests::test_whitespace_trimming' (4719) panicked at src/output/post_process.rs:238:9:
assertion left == right failed
left: "ignored"
right: "hello"
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

failures:
output::post_process::tests::test_whitespace_trimming

test result: FAILED. 482 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.75s

error: test failed, to rerun pass --lib

voxtype-onnx
test vad::tests::test_whisper_vad_model_url ... ok
test vad::whisper_vad::tests::test_threshold_clamping ... ok

failures:

---- output::post_process::tests::test_whitespace_trimming stdout ----

thread 'output::post_process::tests::test_whitespace_trimming' (6549) panicked at src/output/post_process.rs:238:9:
assertion left == right failed
left: "ignored"
right: "hello"
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

failures:
output::post_process::tests::test_whitespace_trimming

test result: FAILED. 528 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.74s

error: test failed, to rerun pass --lib


x86_64-darwin

No rebuilds


aarch64-darwin

No rebuilds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants