Hi there
Pretty new user of Nixos here. No developer, just a user 
If I would like to test a newer version of a package, how would I need to do that? Do I understand it correctly that an overlay is needed?
I am interested in the fprintd package (NixOS Search), which is currently at version 1.94.5 in unstable. But I need the latest version 1.94.9.
Would I need to add such an overlay to my config?
nixpkgs.overlays = [ (self: super: {
fprintd = super.fprintd.overrideAttrs (old: {
finalAttrs.version = "1.94.9";
src.hash = "sha256-..........";
});
}) ];
I am not sure, if that references the attributes correctly. And the hash I would need to calculate myself before and replace it with the calculated value, I guess?
Thanks for any support.
Michael
1 Like
This should be version = "1.94.9";
No, set it to the empty string, rebuild, error tells you the hash.
And setting src.hash
won’t do anything, you really need to set something like
src = old.src.override {
hash = "";
};
or
src = old.src.overrideAttrs {
outputHash = "";
};
instead of src.hash
.
Not necessarily, depends on how you’re using it. If you’re using some nixos module, there’s usually a .package
option you can set instead. (If there isn’t one, then sure, use an overlay.)
2 Likes
Thanks for your support.
I got a few steps further. Apparently the systems even starts building the fprintd in version 1.94.9, but , unfortunately, the nixos package tries to apply a patch, which no longer applies cleanly. The current version is built on 1.94.5, which is about a year old.
So, I need to see what changes are needed to the patch file and then try to also replace the patch file with a custom one.