Pin package mongodb to stop building from source

How can I stop mongodb being build from source very frequently when I upgrade nixos?

1 Like

Not the answer you’re looking for… but see Petition to build and cache unfree packages on - #6 by samuela

1 Like

From what I can find, mongodb is provided in 2 versions, 3.x and 4.x. The former is using AGPL and considered a “free” license, the latter is using a license that isn’t considered “free” and therefore can’t be built by hydra.

As the latter license seems to allow redistribution though, it might be built by hydra again once some things and discussions have been settled. In the thread @aanderse linked are some links to GitHub issues, which again link to other issues.

I skimmed it yesterday and the topics TL’DR seems to be “it’s not as easy as it sounds for legal and ethical reasons”.

PS: A kind-of workaround would be to use a version controlled configuration with pinning and only update the pins through CI, let it build the config and then upload the built system to a (private) cachix instance or a self hosted substitute.