Add program prefix and suffix to BuildOptions#11787
Add program prefix and suffix to BuildOptions#11787sheaf wants to merge 1 commit intohaskell:masterfrom
BuildOptions#11787Conversation
This commits adds two new fields of `BuildOptions`, namely `programPrefix` and `programSuffix`. This allows the installed executable program prefix and suffix to be set by `SetupHooks` for packages with `build-type: Hooks`. Fixes haskell#11168
|
Should cabal-install be updated to use these fields to handle affixes (prefixes and suffixes)? It handles them today on the higher level, but now, if we can do it on the library level, we add redundancy? |
Which part of the All I could find was this, in ignoreProgramAffixes :: ConfigFlags -> ConfigFlags
ignoreProgramAffixes configFlags =
configFlags
{ configProgPrefix = NoFlag
, configProgSuffix = NoFlag
} |
|
I'm talking about these configProgPrefix/configProgSuffix. Are setup hooks not able to leverage those? Or vise versa? |
SetupHooks don't use |
|
@sheaf my bad. I dived a little deeper to try to substantiate my hunch, and here is the place that bothers me: cabal/Cabal/src/Distribution/Types/LocalBuildInfo.hs Lines 318 to 322 in e6ff0cc Shouldn't these read from the new build options instead? Something like: progPrefix, progSuffix :: LocalBuildInfo -> PathTemplate
progPrefix lbi@(LocalBuildInfo{configFlags = cfg}) =
fromMaybe
(fromFlag $ configProgPrefix cfg)
(programPrefix lbi)
progSuffix lbi@(LocalBuildInfo{configFlags = cfg}) =
fromMaybe
(fromFlag $ configProgSuffix cfg)
(programSuffix lbi) |
This commits adds two new fields of
BuildOptions, namelyprogramPrefixandprogramSuffix. This allows the installed executable program prefix and suffix to be set bySetupHooksfor packages withbuild-type: Hooks.Template Α: This PR modifies behaviour or interface
Include the following checklist in your PR: