I’m managed to install the haskell.haskell extension through my configuration.nix file (I know this probably should be a user, not system wide thing but I’m not up to splitting the config like that yet).
However, it’s at version 1.7.1, whereas the current version is 1.8.
This leads me to a few questions:
How do I get nix to install the latest version?
How is it okay to even specify an extension without a version? Isn’t NixOS about reproducibility? Or is there a “version” of NixOS I’m using, and that “snapshot” (for want of a better word) explicitly lists extension versions? Can I “update” that snapshot to get newer extension versions?
Can I specify the version of an extensions without going through the details like listing the SHA256 hash of it etc?
I assume you are using the channel approach to manage your system, which provides only limited reproducibility on its own.
A channel does indeed point to a “snapshot” of nixpkgs, which fixes all of its contents to certain revisions/versions.
You can update that snapshot by using nix-channel --update, which you might need to run as root to update the correct set of channels.
Sadly there is no built-in way to Tel the channel to use a certain snapshot. It’s either the one that was set during last update, or the most recent one when you update the next time.
It’s been on my very long to-do list, to try and make this more similar to vimPlugins, in which we can just have a top-level registry of extension names. And then just have some update logic to generate the latest of each.
(as mentioned) You may need to update your channel
(as mentioned) Switch to a different install method that isn’t using the nixpkgs package
If it’s outdated at the source, create a PR to update the package or create an issue in nixpkgs requesting the package be updated
You don’t know it but you’re using a specific revision of nixpkgs already, and all packages are at a specific version in that revision
For example, see status.nixos.org, which shows what git commit each channel is at
Right now, nixos-unstable is at 98bb5b77c8c6666824a4c13d23befa1e07210ef1, so if that’s the channel you’re using and you’re up to date, you’d be using this haskell.haskell