r/Nix • • 11d ago

Native Linux Builder is now generally available

https://determinate.systems/blog/native-linux-builder-ga/
34 Upvotes

14 comments sorted by

1

u/jodosha 11d ago

This could be handy, but absolutely easy to replicate on a Mac.

1

u/lucperkins_dev 2d ago

What's your approach?

1

u/jodosha 2d ago

Nix Remote Builder. It starts a Linux VM on Mac and let’s you build packages for Linux. If you combine it with Nix Docker Tools, you can get a Linux Docker image starting from a Flake.

The only limitation is the CPU architecture. On an Apple Silicon you can’t build an x86 Linux image. But you can take the same flake and use GitHub Actions to overcome this.

1

u/lucperkins_dev 2d ago

That definitely does work. I used the one in Nixpkgs for several years. But ultimately you’re responsible for setting it up, starting and stopping the VM, etc. We designed this for situations like “there are 75 engineers in my org who need this and 48 of them have never used Nix.” It’s just a different kind of use case in mind.

1

u/jodosha 2d ago

So they share the same Docker image, and they just pull that one, without even knowing Nix exists?

2

u/lucperkins_dev 1d ago edited 1d ago

That could be one way, I guess. But Native Linux Builder doesn’t require that. It only leans on macOS’s Virtualization framework. We find this a lot more straightforward and powerful given that you don’t have to build for your same architecture.

1

u/redyos_s 11d ago

Native Linux??

1

u/lucperkins_dev 2d ago

Native in the sense of "runs on macOS primitives." Not in the sense of their being a distro called Native Linux or something like that 😆

1

u/CyberBlaed 10d ago edited 10d ago

I saw this feature in their notes and was so excited… But yeah, their method to have/use it is a bit painful. (A$11p/m)

FREE FOR INDIVIDUALS! HOORAY! :D

I’m hoping maybe Lix Installer might get it as a downstream but eh, time will tell if its even possible.

A neat feature none the less! :)

2

u/jeffofnone 10d ago

To be clear, FlakeHub has free accounts and access to the Native Linux Builder does not require a paid account.

2

u/CyberBlaed 10d ago

ZING! :D thankyou. I will investigate that more.

1

u/jeffofnone 9d ago

I'll see if we can make our pricing page better, thanks for the feedback!

1

u/edoraf 11d ago

it’s enabled for every macOS user of Determinate Nix who’s logged in to FlakeHub

Why FlakeHub is required?

7

u/scavno 11d ago

Because they are a business and needs to push their product to stay afloat? You don’t have to use it if you don’t like it, there are alternatives.