Nix landed in FreeBSD Ports

Hi!

Iโ€™d like to announce that Nix has just been committed to the FreeBSD Ports Collection. :tada:

FreeBSD support in Nix is not fully complete yet, however. The availability of Nix as a package in FreeBSD should ease the bootstrapping process of the rest of the Nix environment. Perhaps soon we will be able to just casually install Nix package on yet another OS! :smiley:

Thanks to all the kind folks who contributed to the porting efforts.
It was a fun journey. :smiling_imp:

Related links:

Cheers & happy hacking!
Mateusz

20 Likes

Looks like the patches here should be easy to upstream: https://github.com/0mp/freebsd-ports-nix/blob/7e1fb5a96b9473dcbadf245814c1d051b503e92c/files/patch-src_libstore_build.cc

3 Likes

Yes! Iโ€™ll be upstreaming them soon.

2 Likes

Similar on NetBSD (I donโ€™t know much about BSDs but posting in the hope of one helping the other)
https://discourse.nixos.org/t/porting-nix-to-netbsd/8452

Long time ago, hydra.nixos.org was even building nixpkgs for FreeBSD IIRC, but there seemed to be basically no demand at that time and it was eventually discontinued.

1 Like

I guess Darwin differs too much from FreeBSD these days (especially with dependencies requiring Darwin-specific frameworks). But FreeBSD specifics + their use of LLVM/clang, may help shake out assumptions in various parts of the ecosystem, with the large bonus that it only requires a VM to test and no expensive Apple hardware :wink: .

4 Likes

Thatโ€™s really great!

The first time I used nix was on FreeBSD, aeons ago, and NixOS is what got me to return to Linux. I recently switched to OpenBSD so maybe Iโ€™ll try to get nix working there too.

1 Like