OpenBSD + Nix is now a thing

Congratulations to @kl3 who got Nix to run on OpenBSD, and it’s now available as a package for this operating system

Commit message: 'CVS: ports' - MARC

Fediverse announcement



We can do NetBSD and FreeBSD cross right now. If you want to help out with OpenBSD cross I would be happy to assist — and then we can upstream these patch and test OpenBSD cross builds in Nix’s own CI!


2.3.16? Are >= 2.4 that bad?


Cool !

3 weeks ago at Fosdem, I met a french guy who was involved in BSD and he was well aware of the package management in FreeBSD. He didn’t know Nix, we talk about it and he was interested, especially on how Nix was managing all the patches to build Chrome. Since I’m not “an expert”, I showed him quickly where he can find these information in nixpkgs.

I also remember saying to him: “Sadly Nix is not available on BSD” !

I guess things are different now :slight_smile:


what do you mean? The OpenBSD ports of chromium has > 1100 local patches refused by upstream because they don’t support OpenBSD, and it’s working fine with the ports framework

1 Like

Yes, he told me that as well and he was genuinely curious about how we were doing in Nix.

He also told me that there were maintainers of the port that were also maintainer of Chrome and that helped a lot. (as far as I remember)


Nix Pills Big Brain Rocket to mars!

This is great news!

I so miss the lovely devils in BSD, if i could have nixos variant be based on BSD i’d be very very happy indeed.

Is it even possible.

Who can even do it.

And do they want to do it?

@drupol thanks for spreading the nix love there.

Nothing would prevent making a BSD like NixOS


I agree, it would be a POWER HOUSE!

There seems to be a chicken-and-egg problem with developer interest when it comes to porting Nixpkgs to other platforms. But I think it would be awesome if Nixpkgs could reach critical mass with a large proportion of packages working under the BSDs.

I think there’s some ongoing work getting packages to build for FreeBSD and NetBSD as well; you occasionally see them added as platforms for this or that package in PRs today. Additionally, Nix itself is already almost there in those distros port systems (FreeBSD Ports and NetBSD Pkgsrc, respectively), where at least some sort of recent version has been packaged and proposed for inclusion.

Really cool stuff! I think it’s amazing how Pkgsrc works on so many operating systems. It would be crazy cool if Nixpkgs could get to the same place some day.


Nix is not a ‘yolk’. :wink: , this is cockney rhyming slang… yolk, means ‘joke’.

Difficult answer, i do not have one…

Maybe Pkgsrc people have that answer.

I forget that there are not that many cockneys on here.

or is there?

I’m not really sure where you’re trying to go with that metaphorical language. But on any of the BSDs, Nix is certainly a ‘yolk’ in the sense or being almost unrecognizably far from its potential. Same for Nix on Windows and same for Guix on, say, macOS.

There’s not yet enough practical functionality (installable Nix packages) on those platforms for Nix to attract much of a userbase on those platforms. But with hardly any users, the only potential contributors are those who are interested in doing a lot of packaging work and don’t need many working packages today. That’s hardly anyone.

Contrast to Nixpkgs on Linux or Mac, where things are ‘good enough’ to attract lots of users who mostly want to just use Nix but may also make drive-by contributions at the margin. Nixpkgs on those platforms is already over some initial hurdles that it just isn’t on other platforms.

And it does seem to be a bootstrapping/critical mass issue to me; it would be easier to find contributors to a more mature version of any of those Nixpkgs platforms than what is currently in Nixpkgs. That’s why, imo, milestones like the one in the OP can be so exciting: it raises Nix’s visibility in those small communities and also shows some momentum, increasing the hope that Nixpkgs might reach critical mass on those platforms.

1 Like

I just wish Nix won’t become a wall like Docker on the BSDs, with upstream project installation instructions being “just use docker” or “just run nix build”.


I see, I made some corrections.

Things like this can be fixed…

First they ignore you, then the laugh at you, then they fight you and then and only then you win.

I’m not sure which stage nix is at, but it’s certainly fun.

I hope you lot are laughing with me, and not at me.

Else i’ll have to go back into making a living music… and i wouldn’t want anyones eardrums to endure that ;-).

Interesting Insights, I wonder what @Atemu thinks.

1 Like

Code can be found eg freebsd-ports/sysutils/nix at main · freebsd/freebsd-ports · GitHub or FreshPorts -- sysutils/nix: Purely functional package manager

Except an incredible amount of probably underappreciated and hard to upstream work.


Does bsd not support sandboxing? freebsd-ports/Makefile at 37ac9087157fa62e9b5e843be6f742da5e4a68c4 · freebsd/freebsd-ports · GitHub

You linked to FreeBSD ports tree, which is a different operating system

seccomp is Linux specific.

OpenBSD has pledge + unveil , see pledge(2) - OpenBSD manual pages and unveil(2) - OpenBSD manual pages

FreeBSD has capsicum Capsicum - FreeBSD Wiki

No idea for NetBSD and DragonFly BSD (which are the two other main BSD and other different operating systems), nor if they have a working Nix

1 Like

This starts by having a BSD friendly upstream, which is quite rare nowadays :cry:

Hosted by Flying Circus.