Search Results
6/8/2025, 5:14:10 AM
I think there's a ton of misconceptions about what Nix/Guix are and I wanted to write an easy to understand proper introduction about the brilliant concept behind them.
The single biggest misunderstanding is what the hashing mechanism does. So forget everything you think you know about it and let me walk you through this.
First let's look at an example of why universal package management is difficult.
Imagine you want to install 2 programs that both use the same dependency called "libraryA-1.2". However, one of the programs needs libraryA-1.2 to be compiled with support for X and the other needs it compiled without support for X.
So if you only install 1 version of libraryA-1.2 then at least 1 of the programs will always be broken.
Now, this problem can be solved even with traditional package managers by simply creating 2 separate packages for libraryA-1.2, like: "libraryA-1.2-with-X-support" and "libraryA-1.2-without-X-support".
Then each of the 2 programs will link against the appropriate version and all is well. But notice that "-1.2-with-X-support" is now essentially a more robust version string than just "-1.2" alone.
[1/3]
The single biggest misunderstanding is what the hashing mechanism does. So forget everything you think you know about it and let me walk you through this.
First let's look at an example of why universal package management is difficult.
Imagine you want to install 2 programs that both use the same dependency called "libraryA-1.2". However, one of the programs needs libraryA-1.2 to be compiled with support for X and the other needs it compiled without support for X.
So if you only install 1 version of libraryA-1.2 then at least 1 of the programs will always be broken.
Now, this problem can be solved even with traditional package managers by simply creating 2 separate packages for libraryA-1.2, like: "libraryA-1.2-with-X-support" and "libraryA-1.2-without-X-support".
Then each of the 2 programs will link against the appropriate version and all is well. But notice that "-1.2-with-X-support" is now essentially a more robust version string than just "-1.2" alone.
[1/3]
Page 1