# OpenBSD + Nix is now a thing

**URL:** https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525
**Category:** Announcements
**Created:** [February 16, 2023, 9:51pm UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525 "2023-02-16T21:51:51Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Solene](https://discourse.nixos.org/user_avatar/discourse.nixos.org/solene/32/5738_2.png) [@Solene](https://discourse.nixos.org/u/Solene)
#### Post date: [February 16, 2023, 9:51pm UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525/1 "2023-02-16T21:51:51Z")

</div>

Congratulations to @kl3 who got Nix to run on [OpenBSD](https://www.openbsd.org/), and it’s now available as a package for this operating system

Commit message: ['CVS: cvs.openbsd.org: ports' - MARC](https://marc.info/?l=openbsd-ports-cvs&m=167657394218844&w=2)

[Fediverse announcement](https://mammothcirc.us/@qbit/statuses/01GSE0GR1T5RY4WA1QHFBC488Z)

---

<div class="post-metadata">

### Author: ![Ericson2314](https://discourse.nixos.org/user_avatar/discourse.nixos.org/ericson2314/32/316_2.png) [@Ericson2314](https://discourse.nixos.org/u/Ericson2314)
#### Post date: [February 17, 2023, 3:16am UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525/2 "2023-02-17T03:16:59Z")

</div>

Congrats!!

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!

---

<div class="post-metadata">

### Author: ![vcunat](https://discourse.nixos.org/user_avatar/discourse.nixos.org/vcunat/32/11_2.png) [@vcunat](https://discourse.nixos.org/u/vcunat)
#### Post date: [February 17, 2023, 7:08am UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525/3 "2023-02-17T07:08:12Z")

</div>

2.3.16? Are \>= 2.4 that bad?

---

<div class="post-metadata">

### Author: ![drupol](https://discourse.nixos.org/user_avatar/discourse.nixos.org/drupol/32/9471_2.png) [@drupol](https://discourse.nixos.org/u/drupol)
#### Post date: [February 17, 2023, 9:44am UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525/4 "2023-02-17T09:44:35Z")

</div>

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 🙂

---

<div class="post-metadata">

### Author: ![Solene](https://discourse.nixos.org/user_avatar/discourse.nixos.org/solene/32/5738_2.png) [@Solene](https://discourse.nixos.org/u/Solene)
#### Post date: [February 17, 2023, 9:59am UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525/5 "2023-02-17T09:59:50Z")

</div>

> [@drupol](#):
>
> how Nix was managing all the patches to build Chrome

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

---

<div class="post-metadata">

### Author: ![drupol](https://discourse.nixos.org/user_avatar/discourse.nixos.org/drupol/32/9471_2.png) [@drupol](https://discourse.nixos.org/u/drupol)
#### Post date: [February 17, 2023, 11:57am UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525/6 "2023-02-17T11:57:06Z")

</div>

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)

---

<div class="post-metadata">

### Author: ![nixinator](https://discourse.nixos.org/user_avatar/discourse.nixos.org/nixinator/32/3859_2.png) [@nixinator](https://discourse.nixos.org/u/nixinator)
#### Post date: [February 17, 2023, 12:15pm UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525/7 "2023-02-17T12:15:30Z")

</div>

[https://❄💊🧠🚀.y.at](https://xn--tdi1758mbibzxf.y.at)

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.

---

<div class="post-metadata">

### Author: ![Solene](https://discourse.nixos.org/user_avatar/discourse.nixos.org/solene/32/5738_2.png) [@Solene](https://discourse.nixos.org/u/Solene)
#### Post date: [February 17, 2023, 1:17pm UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525/8 "2023-02-17T13:17:12Z")

</div>

Nothing would prevent making a BSD like NixOS

---

<div class="post-metadata">

### Author: ![nixinator](https://discourse.nixos.org/user_avatar/discourse.nixos.org/nixinator/32/3859_2.png) [@nixinator](https://discourse.nixos.org/u/nixinator)
#### Post date: [February 17, 2023, 1:49pm UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525/9 "2023-02-17T13:49:06Z")

</div>

I agree, it would be a POWER HOUSE!

---

<div class="post-metadata">

### Author: ![pxc](https://discourse.nixos.org/user_avatar/discourse.nixos.org/pxc/32/17601_2.png) [@pxc](https://discourse.nixos.org/u/pxc)
#### Post date: [February 17, 2023, 3:44pm UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525/10 "2023-02-17T15:44:02Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![nixinator](https://discourse.nixos.org/user_avatar/discourse.nixos.org/nixinator/32/3859_2.png) [@nixinator](https://discourse.nixos.org/u/nixinator)
#### Post date: [February 17, 2023, 4:19pm UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525/11 "2023-02-17T16:19:38Z")

</div>

Nix is not a ‘yolk’. 😉 , 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?

---

<div class="post-metadata">

### Author: ![pxc](https://discourse.nixos.org/user_avatar/discourse.nixos.org/pxc/32/17601_2.png) [@pxc](https://discourse.nixos.org/u/pxc)
#### Post date: [February 17, 2023, 4:47pm UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525/12 "2023-02-17T16:47:41Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Solene](https://discourse.nixos.org/user_avatar/discourse.nixos.org/solene/32/5738_2.png) [@Solene](https://discourse.nixos.org/u/Solene)
#### Post date: [February 17, 2023, 5:08pm UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525/13 "2023-02-17T17:08:45Z")

</div>

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”.

---

<div class="post-metadata">

### Author: ![nixinator](https://discourse.nixos.org/user_avatar/discourse.nixos.org/nixinator/32/3859_2.png) [@nixinator](https://discourse.nixos.org/u/nixinator)
#### Post date: [February 17, 2023, 5:11pm UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525/14 "2023-02-17T17:11:14Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Sandro](https://discourse.nixos.org/user_avatar/discourse.nixos.org/sandro/32/2865_2.png) [@Sandro](https://discourse.nixos.org/u/Sandro)
#### Post date: [February 18, 2023, 4:51pm UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525/15 "2023-02-18T16:51:27Z")

</div>

> [@Solene](#):
>
> Commit message: [‘CVS: cvs.openbsd.org: ports’ - MARC](https://marc.info/?l=openbsd-ports-cvs&m=167657394218844&w=2)

Code can be found eg [freebsd-ports/sysutils/nix at main · freebsd/freebsd-ports · GitHub](https://github.com/freebsd/freebsd-ports/tree/main/sysutils/nix) or [FreshPorts -- sysutils/nix: Purely functional package manager](https://www.freshports.org/sysutils/nix)

---

<div class="post-metadata">

### Author: ![sternenseemann](https://discourse.nixos.org/user_avatar/discourse.nixos.org/sternenseemann/32/3809_2.png) [@sternenseemann](https://discourse.nixos.org/u/sternenseemann)
#### Post date: [February 18, 2023, 6:13pm UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525/16 "2023-02-18T18:13:53Z")

</div>

> [@Solene](#):
>
> Nothing would prevent making a BSD like NixOS

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

---

<div class="post-metadata">

### Author: ![Sandro](https://discourse.nixos.org/user_avatar/discourse.nixos.org/sandro/32/2865_2.png) [@Sandro](https://discourse.nixos.org/u/Sandro)
#### Post date: [February 18, 2023, 6:49pm UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525/17 "2023-02-18T18:49:03Z")

</div>

Does bsd not support sandboxing? [https://github.com/freebsd/freebsd-ports/blob/37ac9087157fa62e9b5e843be6f742da5e4a68c4/sysutils/nix/Makefile#L45](https://github.com/freebsd/freebsd-ports/blob/37ac9087157fa62e9b5e843be6f742da5e4a68c4/sysutils/nix/Makefile#L45)

---

<div class="post-metadata">

### Author: ![Solene](https://discourse.nixos.org/user_avatar/discourse.nixos.org/solene/32/5738_2.png) [@Solene](https://discourse.nixos.org/u/Solene)
#### Post date: [February 18, 2023, 11:37pm UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525/18 "2023-02-18T23:37:22Z")

</div>

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

- [ports/sysutils/nix/](https://cvsweb.openbsd.org/ports/sysutils/nix/)
- github mirror: [https://github.com/openbsd/ports/tree/master/sysutils/nix](https://github.com/openbsd/ports/tree/master/sysutils/nix)

---

<div class="post-metadata">

### Author: ![Solene](https://discourse.nixos.org/user_avatar/discourse.nixos.org/solene/32/5738_2.png) [@Solene](https://discourse.nixos.org/u/Solene)
#### Post date: [February 18, 2023, 11:39pm UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525/19 "2023-02-18T23:39:04Z")

</div>

seccomp is Linux specific.

OpenBSD has pledge + unveil , see [man.openbsd.org/pledge](http://man.openbsd.org/pledge) and [unveil(2) - OpenBSD manual pages](http://man.openbsd.org/unveil)

FreeBSD has capsicum [Capsicum - FreeBSD Wiki](https://wiki.freebsd.org/Capsicum)

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

---

<div class="post-metadata">

### Author: ![Solene](https://discourse.nixos.org/user_avatar/discourse.nixos.org/solene/32/5738_2.png) [@Solene](https://discourse.nixos.org/u/Solene)
#### Post date: [February 18, 2023, 11:39pm UTC](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525/20 "2023-02-18T23:39:45Z")

</div>

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

[Next page](https://discourse.nixos.org/t/openbsd-nix-is-now-a-thing/25525.md?page=2)
