Cannot run shell script as a preprocessor
I have a problem with my package MicroHs
I need to run a preprocessor on all Haskell files. The command line has the following
... -F -pgmF ./Tools/convertX.sh ...
This works locally when I do cabal build, but fails on the hackage build server.
Is there something I can do to make it work?
I don't mind rewriting the preprocessor in C if that makes it viable (it will be <10 lines).
I think you'd find the approach would also fail if your package exposed a library that another package depended on (or, in a more anodyne case, if you tried to cabal install from the tarball). The "preferred" way to do this these days would be (off the top of my head) with a build-tools-depends: clause in your cabal file, which referred to a haskell excutable which would be built and put in path during the build phase (so it could be used as a preprocessor).
Cf: https://cabal.readthedocs.io/en/3.4/cabal-package.html#pkg-field-build-tool-depends
No action to be taken here.