My pc nixos version is currently in 20.09, however master nixpkgs are still actively being updated because new pkgs get added and bugs fixed. I was wondering what’s the best practice to get the specific version of a pkg?
the following is what I have done for hugo
self: super:
let
unstable-pkgs = import (builtins.fetchTarball {
# 09.16.2020
url = https://github.com/NixOS/nixpkgs/tarball/441a7da8080352881bb52f85e910d8855e83fc55;
}) {config.allowUnfree = true;};
in {
# version : 0.74.3
hugo = unstable-pkgs.hugo;
}
the issue here is I am not sure which commit will be stored to tarball, I have to do try and error to figure it out.
The archives on GitHub are most probably generated on demand and cached. It should be possible to just replace the commit ID, but maybe the service only fills the cache if you‘re authenticated. Try going through the web site and clicking on the Download dropdown for some commit you are viewing.