Hi everyone! How can I decompress files downloaded using fetchurl? I’ve figured out that postFetch hook can be used for that, but how can I rename the file in the nix store?
To decompress files you want fetchzip. If it does not deal with a particular compression format, add stuff to unpackPhase. Since usually these archive contains multiple files, i guess they will be created in a subfolder based on the pname?
Now, I’m not sure why you want to do that, but if you do some more steps, you might prefer to move the compression part to unpackPhase, and use installPhase/buildPhase to do other stuff on this json.
If I want to turn it into a function, can I use fetchzip, but skip unpacking and only decompress on “non-archives”? So, basically I guess it should be similar to your example but with unpackPhase from fetchzip?