- Feb 2021
-
nix-tutorial.gitlabpages.inria.fr nix-tutorial.gitlabpages.inria.fr
-
nix-channel --list #<output> nixpkgs https://nixos.org/channels/nixpkgs-unstable The command returns a name for each channel (e.g., nixpkgs) and an URL. Note When running nix-env with the parameter -A, one can select the channel to get the package from. Such a command looks like nix-env -iA channelname.packagename.
Instead of
#<output>
it should have saidchannel-name
instead at the topnix-channel
example to keep it consistent. -
However, using channels is not fully reproducible, as a channel may evolve to incorporate updates.
TODO: Find other sources about this topic. I remember this mentioned already (and it makes) sense, but need to learn more.
TODO: What is a better alternative? An own repo? Flakes? Can cachix help?
It says right below that pinning can help but keep looking.
When package reproducibility become a major concern, as it is the case in this tutorial, it is preferable to refer to a pinned version of the nixpkgs repository instead — i.e, a specific commit of the repository or an immutable archived tarball. The ability to pin the version of nixpkgs is powerful, it will ensure that a package is always constructed from the same Nix source. As we go deeper in the tutorial we avoid using channels in favor of pinned environments.
-
However, it makes the “Making the package available to the user” more complex. Nix heavily relies on environment variables to make this possible
And symlinks
-
-
nix-tutorial.gitlabpages.inria.fr nix-tutorial.gitlabpages.inria.fr
-
Even if this is possible, we chose not to use Nix to store the experiment input and output data in this tutorial.
How?
-