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

16 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

2 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)

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

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