Reputation: 24774
I want to include an executable file in the cabal data-files
section to execute it as a subprocess in my Haskell program.
The file's there, getDataFileName
works for it, but it lacks the executable bit and so trying to run it with System.Process.createProcess
fails with permission denied
.
Is there a way for cabal to preserve the execution permission of the file? Is there another clean way to solve this?
Upvotes: 6
Views: 522
Reputation: 38893
As summarized in some discussion on cabal patches, the current (underdocumented) state of play is that one should use both a copy and an install hook, since one or the other will get executed.
Edit: After some digging, there's an old ticket on libexec support in cabal, which would be a very nice solution if it were implemented.
Upvotes: 3