I’m trying to write a derivation for SimSET, whose installation procedure requires some of the distributed files to be patched (edited by hand, according to the guide), depending on the architecture on which the software is to be compiled.
What would be a good way of expressing these architecture-dependent patches?
You can inspect stdenv.hostPlatform to figure out which flags to add (e.g. stdenv.hostPlatform.isLinux, stdenv.hostPlatform.is64Bit, stdenv.hostPlatform.system etc.).
Then you can set derivation attributes based on this information: