I started looking at and asking about nix and ended up running across guix, which appears to be a lot more popular (at least in the areas I frequent) with people talking about lots of issues nix has that guix doesn’t. Before I start actually learning one, anyone here have a good modern comparison between them?
I periodically google “nix vs guix” to stay semi-up-to-date, but so far the only difference seems to be that
- guix uses Guile Scheme instead of Nix as the configuration language, and that
- non-free software packages will never be officially accepted (but there are plenty of 3rd party repos out there)
I still cannot grasp Guix. While I like that they use Scheme, I didn’t yet spent enough time with it. Also I hadn’t check their macOS support when Nix support is pretty ok.
Which I very much like I have to admit, Nix’s format is confusing at initial look… ^.^;
It’s not non-free, but rather non-open-source. GUIX mandates that there is an entire versioned history of the entire system. I.E. you should be able to rollback to any working point, even from a non-working point, and it can’t do that if the compiler isn’t able to be recompiled as well so it can generate identical code ‘at the time’ of that system version. Mac’s apparently have this horrible horrifying thing called XCode that apparently breaks at times (they listed a few specific times that absolutely broke a lot of things, even erlang was broken by it at least once) and if you want to work with the system API’s you apparently need to use XCode’s stuff.
So it’s more of a Mac’s are broken is why GUIX isn’t supported there (works fine in Docker though). Ditto with Windows though mingw works better there.
Mac’s aren’t supported because Mac’s development toolchain is broken. It is only supported within a docker container on Mac’s. ^.^
In general though, it seems GUIX is newer than NIX, because of specific issues that NIX itself has that can’t be fixed in a backwards compatible way.
And yes, like NixOS there is a GUIX System too, lol
This article seems very Lisp fanatic:
“Rolling out one’s own programming language” is a very common fallacy in software development.
Not that Nix language is perfect, but this article sounds “a little” fanboyish towards Lisps.
Oh I didn’t link it necessarily as an article for guix, just ‘about’ it, I thought it was an interesting read. ^.^
Yeah, but the only mentioned “disadvantage” of Nix in this article is that Nix use it’s own language instead of using something like Scheme.
Yeah? It’s not a pro/con article nor did I try to link a pro/con article, purely informative about what guix is in a very general sense, I’m trying to elicit conversation between people ‘here’ that have used both so I can see usage comparisons… From the little reading I’ve done so far the main difference between them (other than language) is that guix makes functional rebuilds at every level, even down to full system state, where nix is focused on program builds more directly and is not guaranteed to make binary identical rebuilds in the future.
So I’m wondering what you are referencing by stating
Yeah, but the only mentioned “disadvantage” of Nix in this article is that Nix use it’s own language instead of using something like Scheme. or what it had to do with what I was asking? I’m confused by it… ^.^;
This is not true. Nix is very much trying to make the rebuilds idempotent. So there is no difference there as well. Of course there is no guarantee for that (as it would be impossible), but everything in Nixpkgs should properly build in sandbox and should result with identical derivation. And including system state (check out
nixos-rebuild) and supports rollbacks as well. Guile is mostly almost 1:1 equivalent to Nix with different definition language and better UX.
Hmm, does it not work on Mac’s then? The reason GUIX can’t work on Mac’s is because different compiler versions generate different code, so if you roll back then you need to use the identical compiler version at the time as well, so GUIX has it’s own self-built GCC/clang/whatever, the whole ecosystem is built on up, and the issue on Mac’s is that XCode has to be used for some things, which breaks idempotent builds. How does NIX handle this or does it not work on Mac’s as well?
Never ran across the dhall language before, added to research, lol. ^.^
Honestly I can figure out the language, it’s the back-end between them I’m more curious in as to which or which. Scheme is really nice though. ^.^;
I do not know the minute details here, but I believe guix actually shares at least some portion of it’s backend with Nix. At least that is something that I had heard. I have not looked deep into either backend to know for sure though.
I am curious though, GUIX doesn’t work on Mac’s as they say they can’t be Idempotent on Mac’s because of it’s broken XCode ecosystem. What does NIX do?
hnix to the mix then:
It also has a form of type-checker:
Dhall can be also used to type-check Nix, but there are limitations:
I always like that, lol. ^.^
Just my two cents: I was recently researching this topic for server deployments. While I’m not really fond of the NixOS decision to use systemd, the integration and management is awesome.
I shyed away from GUIX because it seems to be even more niche than Nix. And while I like a good, scheme based language, I have little issues with a good DSL as long as I don’t have to actually develop it
I really like NixOS so far, because it is dead simple to add services to the system (nginx with automatic ssl anyone?) and it is great to roll back when anything goes pear shaped.
TL;DR; so far I have not come to regret not going with GUIX
It handles it by using semi-sandboxed system where some non-Nix directories are available in sandbox.
Which does what in the case of mac code that requires xcode? Or does it only allow a locally built compiler?
AFAIK (I haven’t tested it though) it will use system compiler if available and fetch one if there isn’t one. But as I said, I haven’t tested that so I can be wrong.