Skip to content

General Nix Maintenance - #464

Merged
vedderb merged 8 commits into
vedderb:masterfrom
MilesBreslin:mbreslin/nix_maintenance
Aug 23, 2026
Merged

General Nix Maintenance#464
vedderb merged 8 commits into
vedderb:masterfrom
MilesBreslin:mbreslin/nix_maintenance

Conversation

@MilesBreslin

@MilesBreslin MilesBreslin commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

We have a nix flake support and I appreciate that! Here's some maintenance for it.

Confirmed building on x86_64-linux and aarch64-darwin. Use nix build github:MilesBreslin/vesc_tool/mbreslin/nix_maintenance# to test locally.


flake.nix: Update nixpkgs to 26.05

General maintenance. Update the build packages to keep up with the
latest release.

flake.nix: Update treefmt-nix

General maintenance to stay up-to-date with the latest treefmt-nix.

flake.nix: Track bldc master branch

bldc master branch has moved to gcc 14. We no longer need to support a
hack to get gcc 7 pulled in. This removes nixpkgsOld and all references
to it.

flake.nix: Add build targets for all nix systems

Support attempting to build these packages on all nix-supported
platforms. This allows a developer to request a build, even on an
unsupported platform, which would be rejected by meta.platforms with
a prettier error message. bldc-fw is a cross-compiled target, so it
in-particular should build nicely on any platform.

Previously, GCC 7 was used, which was only ever packaged by nixpkgs as
x86_64-linux. Now that this is using GCC 14, that's no longer holding
this back.

This adds support for systems like: aarch64-linux, x86_64-darwin,
aarch64-darwin.

vesc-tool: Select release config by platform

Use the macOS qmake release configuration on Darwin while preserving
the Linux configuration on other supported hosts.

pkgs/vesc-tool: Install the Darwin application bundle

The package formats for macOS and Linux are very different. Change the
installPhase to reflect that. Copy the app bundle produced by the macOS
release configuration into the conventional Nix Applications directory.
Keep the existing binary and desktop-file installation behavior for
Linux.

pkgs/vesc-tool: Build the native Darwin architecture

Override the universal qmake configuration with the Nix target
architecture. This lets Darwin builds link against the matching
single-architecture Qt libraries.

pkgs/vesc-tool: Mark Darwin/macOS as a supported platform

Nix on macOS succesfully builds now. Mark it as supported.

Darwin support requires the sandbox to be set to relaxed due to a
requirement from the QT nix configuration.

General maintenance. Update the build packages to keep up with the
latest release.
General maintenance to stay up-to-date with the latest treefmt-nix.
@github-actions

github-actions Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@MilesBreslin

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@MilesBreslin
MilesBreslin marked this pull request as draft August 23, 2026 05:00
bldc master branch has moved to gcc 14. We no longer need to support a
hack to get gcc 7 pulled in. This removes nixpkgsOld and all references
to it.
Support attempting to build these packages on all nix-supported
platforms. This allows a developer to request a build, even on an
unsupported platform, which would be rejected by meta.platforms with
a prettier error message. bldc-fw is a cross-compiled target, so it
in-particular should build nicely on any platform.

Previously, GCC 7 was used, which was only ever packaged by nixpkgs as
x86_64-linux. Now that this is using GCC 14, that's no longer holding
this back.

This adds support for systems like: aarch64-linux, x86_64-darwin,
aarch64-darwin.
Use the macOS qmake release configuration on Darwin while preserving
the Linux configuration on other supported hosts.
The package formats for macOS and Linux are very different. Change the
installPhase to reflect that. Copy the app bundle produced by the macOS
release configuration into the conventional Nix Applications directory.
Keep the existing binary and desktop-file installation behavior for
Linux.
Override the universal qmake configuration with the Nix target
architecture. This lets Darwin builds link against the matching
single-architecture Qt libraries.
@MilesBreslin
MilesBreslin force-pushed the mbreslin/nix_maintenance branch from f3b9899 to d799d6c Compare August 23, 2026 05:43
@MilesBreslin
MilesBreslin marked this pull request as ready for review August 23, 2026 05:48
Nix on macOS succesfully builds now. Mark it as supported.

Darwin support requires the sandbox to be set to relaxed due to a
requirement from the QT nix configuration.
@MilesBreslin
MilesBreslin force-pushed the mbreslin/nix_maintenance branch from d799d6c to 0efeef8 Compare August 23, 2026 06:40
@vedderb
vedderb merged commit aaeba12 into vedderb:master Aug 23, 2026
1 check passed
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants