Nix package manager with Linux compatibility

I had the same question, must admit I'm surprised no one has answered it after all this time. I guess the answer is probably no, as while it has macOS support it may simply be incompatible with FreeBSD as the two while related, do differ significantly. I suppose if you need extra packages you should use pkgsrc (https://www.pkgsrc.org/), although to my knowledge it has half as many packages as FreeBSD's ports collection, or Ravenports (http://www.ravenports.com/), which also has fairly small repos.
 
I am not too aware of the details but there is interest to bring NixOS like features to FreeBSD build system but:
  1. the Nix language should be completely rewritten with a compatible license ( and others particular necessities );
  2. someone should rewrite the FreeBSD build system, including the ports system, to work with that.
I don't believe of anyone doing that, specially in a short time, without funding. Well, I guess Marino ( the Ravenports folk ) would be able to do that as fast as possible but he is not in the project anymore...
 
I suppose if you need extra packages you should use pkgsrc (https://www.pkgsrc.org/), although to my knowledge it has half as many packages as FreeBSD's ports collection, or Ravenports (http://www.ravenports.com/), which also has fairly small repos.

The amount of ports is not really the most important thing. FreeBSD has 37k+ ports, a large part of it are SLAVEPORTS which means the same port with variations, so the numbers are rather inflacted. Also, I guess there should have at least a thousand of ports which are completely useless ( nobody use it ).

Pkgsrc seem problematic trying to support too many things/architectures ( this is why DragonFlyBSD switched to DPorts ).

Ravenports have few ports but have its variations built-in, and so it will not get inflated ( at least not too much ), but yes it has few ports; however:
  1. it already has most of the necessary ports for server use;
  2. the situation should improve when it hit the point it has the minimum amount of ports to DragonFlyBSD be able to switch to it ( should not take too much time ), and will not be necessary to Marino to maintain the DPorts and Ravenports ( yes, he is maintaining both almost alone ).
Cheers!
 
FreeBSD ports has flavors which is basically the same as what many of the slave ports do, offer a variation of the main port. Unfortunately only a small portion of ports have been converted to use flavors and there is some resistance to them because portmaster (and probably portupgrade as well) for some reason can not cope with them.
 
No! Flavors are just allowed for things like qt4-qt5, gtk2-gtk3 and similar. Transmission, for instance, cannot be flavored it should be SLAVEPORTS ( technically it can, I already FLAVORED it ) except by the qt4-qt5 version which are flavored. Just when at some point sub-packages be implemented SLAVEPORTS should be deprecated.

Also, you cannot have two different versions of the software in one port ( and install both at the same time ), like, for instance, php71 and php72 being just one port and you still be able to install both versions at the same time. You can do that with Ravenports.

[EDIT]

Also, even with the few number of FLAVORized ports ( in relation with the total amount of ports ) the number of packages are already exploding. It is not just about the building tools. ;)
 
I am also interested in this. Has anyone tested Nix on FreeBSD?
Suppose it works perfectly, then you have over 80 000 Nix packages on FreeBSD.
In that case I could install Brave or another browser that isn't in ports.
 
Voltaire I tried a little bit, but it would take a lot of effort to make it work in any meaningful way I believe. Chances are you really need to get into the details of both Nix and FreeBSD. If you are interested in experimenting, we could try looking at it together. Let me know.

As for Brave, I am running this via linux-browser-installer and it works just fine.
 
Voltaire I tried a little bit, but it would take a lot of effort to make it work in any meaningful way I believe. Chances are you really need to get into the details of both Nix and FreeBSD. If you are interested in experimenting, we could try looking at it together. Let me know.

As for Brave, I am running this via linux-browser-installer and it works just fine.
The reason I wanted to install and learn Nix was mainly to be able to install more browsers. You solved this problem by mentioning linux-browser-installer.

I installed Brave and it is exactly 28% faster than Chromium in Speedometer 2.0. In other benchmarks like JetStream 2, Octane 2.0 and Kraken 1.1 Brave is on average 5% faster than Chromium. I find this odd because I thought native Chromium would be faster anyway, but in JavaScript the Linux version of Brave is actually faster. In terms of graphics, Chromium is also not exactly faster, or not much.

Chrome and Edge are not working properly at the moment, they both have a process that consumes around 80% of the CPU, so they have very slow performance.

Vivaldi is currently unable to install via the script, it cannot find the package. I guess I just need to make a simple change to the script for it to work. It would be helpful if you took a look at this.
 
As much as I like playing with Nix, I doubt it would have been a good solution in this case. In its present state it might need a lot of work to get something useful out of it for FreeBSD. You sadly can't expect it to just build stuff on FreeBSD that was made for Linux or macOS. Probably you would have to customize a lot of how Nix is building the individual derivations for the software you want.

However, great to know that linux-browser-installer also did the trick for you!
 
Back
Top