[GH-ISSUE #520] When setting "features" through HomeManager config in Nix, cargo throws an error #5793

Closed
opened 2026-05-23 01:53:03 +01:00 by JakeStanger · 5 comments
Owner

Originally created by @tukanoidd on GitHub (Mar 31, 2024).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/520

Describe the bug
When I set the "features" option in programs.ironbar.features, I get a build error:

last 10 log lines:
> cargo --no-default-features -F "cli,http,config+json,clipboard,clock,focused,launcher,music+all,notification,sys_info,tray,upower,volume" build $cargo_release -j "$NIX_BUILD_CORES" --message-format=$cargo_message_format
> error: unexpected argument '--no-default-features' found
>
>   tip: 'build --no-default-features' exists
>
> Usage: cargo [OPTIONS] [COMMAND]
>        cargo [OPTIONS] -Zscript <MANIFEST_RS> [ARGS]...
>
> For more information, try '--help'.
> [naersk] cargo returned with exit code 1, exiting

To Reproduce
Steps to reproduce the behavior:

  1. Set programs.ironbar.features to something else than []
  2. Try rebuilding the system
  3. Get the error

Expected behavior
Project builds.

System information:

  • Distro: NixOS unstable
  • Compositor: Hyprland/Trying to make it work in niri as I'm assuming, workspace specific code makes it not show up (maybe?)
  • Ironbar version: 0.15.0-pre (dictated by the flake)

Configuration

N/A

Additional Context
I made sure to run nix flake update and try to build again in case the bug was fixed, but it wasn't.

I also took a look into default.nix and all does seem good, so I'm not sure if it's the ironbar flake or naersk issue, so sorry if this issue is not relevant here.

Screenshots
image

Originally created by @tukanoidd on GitHub (Mar 31, 2024). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/520 **Describe the bug** When I set the "features" option in `programs.ironbar.features`, I get a build error: ``` last 10 log lines: > cargo --no-default-features -F "cli,http,config+json,clipboard,clock,focused,launcher,music+all,notification,sys_info,tray,upower,volume" build $cargo_release -j "$NIX_BUILD_CORES" --message-format=$cargo_message_format > error: unexpected argument '--no-default-features' found > > tip: 'build --no-default-features' exists > > Usage: cargo [OPTIONS] [COMMAND] > cargo [OPTIONS] -Zscript <MANIFEST_RS> [ARGS]... > > For more information, try '--help'. > [naersk] cargo returned with exit code 1, exiting ``` **To Reproduce** Steps to reproduce the behavior: 1. Set `programs.ironbar.features` to something else than `[]` 2. Try rebuilding the system 3. Get the error **Expected behavior** Project builds. **System information:** - Distro: NixOS unstable - Compositor: Hyprland/Trying to make it work in niri as I'm assuming, workspace specific code makes it not show up (maybe?) - Ironbar version: 0.15.0-pre (dictated by the flake) **Configuration** > N/A **Additional Context** I made sure to run nix flake update and try to build again in case the bug was fixed, but it wasn't. I also took a look into `default.nix` and all does seem good, so I'm not sure if it's the ironbar flake or naersk issue, so sorry if this issue is not relevant here. **Screenshots** ![image](https://github.com/JakeStanger/ironbar/assets/45230259/e99c30aa-d79a-4df5-8cc3-747675b54dda)
JakeStanger 2026-05-23 01:53:03 +01:00
  • closed this issue
  • added the
    T:Bug
    label
Author
Owner

@JakeStanger commented on GitHub (Mar 31, 2024):

I think this is because the naersk builder was using the wrong option for passing build flags. I've amended that in the PR above - is this something you're able to confirm resolves the issue please?

I presume you'll need to overwrite the derivation or something? Not sure how that works with Nix.

<!-- gh-comment-id:2028918930 --> @JakeStanger commented on GitHub (Mar 31, 2024): I think this is because the naersk builder was using the wrong option for passing build flags. I've amended that in the PR above - is this something you're able to confirm resolves the issue please? I presume you'll need to overwrite the derivation or something? Not sure how that works with Nix.
Author
Owner

@tukanoidd commented on GitHub (Apr 1, 2024):

Will try, although I'm not sure how to use the PR version as the input, haven't done it before, need to check first, will lyk as soon as I get some results

<!-- gh-comment-id:2028975946 --> @tukanoidd commented on GitHub (Apr 1, 2024): Will try, although I'm not sure how to use the PR version as the input, haven't done it before, need to check first, will lyk as soon as I get some results
Author
Owner

@tukanoidd commented on GitHub (Apr 1, 2024):

Ok, found it, and the build does seem to go through, thanks for the fix!

<!-- gh-comment-id:2028977652 --> @tukanoidd commented on GitHub (Apr 1, 2024): Ok, found it, and the build does seem to go through, thanks for the fix!
Author
Owner

@JakeStanger commented on GitHub (Apr 1, 2024):

Perfect, thanks for testing that. Merged so you can target master now.

<!-- gh-comment-id:2028983899 --> @JakeStanger commented on GitHub (Apr 1, 2024): Perfect, thanks for testing that. Merged so you can target master now.
Author
Owner

@tukanoidd commented on GitHub (Apr 1, 2024):

Thanks!

<!-- gh-comment-id:2028984149 --> @tukanoidd commented on GitHub (Apr 1, 2024): Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#5793
No description provided.