Nix Flakes and their Guix Equivalents

34 points by Kratacoa


goldstein

after reading the post, I’m still not sure how do I specify and pin dependencies for a project (so I can publish it and share with others) without manually finding and specifying the commit hash for each (transitive) dependency in channels.scm. the time-machine thing seems to only work for guix package set, not for other out-of-tree dependencies?

The guix time-machine command is genuinely unique and has no direct flake equivalent. It lets you travel to any point in Guix's history — not just to pinned dependency versions, but to a completely different state of the package collection

you can quite easily run code from another point in nixpkgs history:

nix run github:nixos/nixpkgs/<commit hash>#<package>

guix is unique here in that it doesn’t separate version of the package collection from the version of the package manager: running an old package involves also running an old release of guix. I’m honestly not sure why would I want that.

Flakes can pin dependencies, but you can't easily say "run this with the version of nixpkgs from six months ago" without manually finding and specifying the commit. With Guix, guix time-machine --commit=... -- does exactly this.

I really don’t understand this statement. posts says that flakes require “manually finding and specifying the commit” and then provides a guix command that requires to specify the commit. you can also override the version of nixpkgs for some flake by using --override-input, although it is messy and one of the things I’m trying to improve with unflake.