Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Pass extra parameters of 'configure' to user hooks #809

Closed
bos opened this Issue · 1 comment

4 participants

@bos
Owner

(Imported from Trac #819, reported by guest on 2011-03-22)

Non-standard options to 'configure' are not supported by Cabal; to accept new options requires writing a custom version of Cabal's 'defaultMain'. It would be useful to provide some support for extending the command-line parser, or at least passing unrecognized arguments to user hooks.

To motivate this feature, here's my use case. During the build phase, my package builds an executable, then uses the executable to build some data files. The executable and data files are installed together. If the executable needs extra arguments (e.g., search paths) to run, they can be supplied as command-line parameters to 'configure'. Supporting these extra parameters required some changes to Cabal.

I did it by copying 'defaultMainWithHooks' and some 200-odd lines of non-exported functions from Distribution.Simple into my package's Setup.hs so that I could override 'configureCommand'. This gave me access to the command-line parser. Relatively little code was actually changed, so hopefully this feature would fit nicely into the current codebase.

@ttuegel ttuegel added this to the _|_ milestone
@BardurArantsson

Lodged in 2011. No feedback. Close.

@23Skidoo 23Skidoo closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.