hackage-server icon indicating copy to clipboard operation
hackage-server copied to clipboard

Cannot run shell script as a preprocessor

Open augustss opened this issue 2 years ago • 1 comments

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).

augustss avatar Nov 23 '23 11:11 augustss

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

gbaz avatar Nov 28 '23 06:11 gbaz

No action to be taken here.

andreasabel avatar Mar 18 '24 19:03 andreasabel