I have a derivation for a SDDM theme on NixOS, and I want to update the theme.conf file. My solution is to make a patch file with my configs and apply that patch to theme.conf. Here’s my (incomplete) derivation:
The problem I have is that I don’t know how to get the sha256 hash. I did some experimentation by downloading a patch included in a derivation that gives the sha256, and running nix hash file on the downloaded patch and comparing this to the sha256 in the derivation, but they aren’t the same. I also had a look online and on Discourse but I couldn’t find any relevant threads.
Any help on this, or indeed updating my theme.conf file would be appreciated.
Got the sha256 value, thanks for the solution. How exactly do I write the postFetch function, or is there a simpler way to change my conf file? Here’s my attempt (I don’t really know what I’m doing though):
I checked the conf file after rebuilding but the change hasn’t been applied. This was when I simply added the patch to the patches list without postFetch. If postFetch doesn’t work what else should I try?
I wanted to ask for the derivation and the sources, though just realise that they are in the OP and wanted to delete my post now Though as you already answered, I will take a closer look in a minute or 2.
postFetch is an internal function of fetchpatch don’t need to care about it. it’s stripping the patch of any extra information and may also reorder the hunks in alphabetical path order