Hello Guix, Writing package definition, I have need of a non-trivial wrapper script that decides how to execute the installed binary. How do I accomplish this?
With my vague understanding, I am envisioning writing a gexp directly in the install phase and would like to somehow reify this into a guile script and install that file under <out>/bin. Is this correct, at the high level? More specifically, the package I have builds separate libraries for CPUs with AVX, AVX2, and no AVX support. Since build-type isn't sufficiently specific to distinguish such CPU features, I have, so far, opted to just build all three libs and stuff them under <out>/lib/<foo>. My idea is to have the linker script check CPU features at runtime (by parsing /proc/cpuinfo or something) and executing the binary with the parameters to load the correct binary. Perhaps there is a better overall approach? Appreciate your thoughts!