-
Notifications
You must be signed in to change notification settings - Fork 710
Allow ${pkgroot} prefix. #4892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow ${pkgroot} prefix. #4892
Changes from all commits
08f7b13
5303684
c7edd1c
1646204
1283d83
e98bbd3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1486,6 +1486,7 @@ instance Semigroup InfoFlags where | |
data InstallFlags = InstallFlags { | ||
installDocumentation :: Flag Bool, | ||
installHaddockIndex :: Flag PathTemplate, | ||
installDest :: Flag Cabal.CopyDest, | ||
installDryRun :: Flag Bool, | ||
installMaxBackjumps :: Flag Int, | ||
installReorderGoals :: Flag ReorderGoals, | ||
|
@@ -1530,6 +1531,7 @@ defaultInstallFlags :: InstallFlags | |
defaultInstallFlags = InstallFlags { | ||
installDocumentation = Flag False, | ||
installHaddockIndex = Flag docIndexFile, | ||
installDest = Flag Cabal.NoCopyDest, | ||
installDryRun = Flag False, | ||
installMaxBackjumps = Flag defaultMaxBackjumps, | ||
installReorderGoals = Flag (ReorderGoals False), | ||
|
@@ -1628,12 +1630,20 @@ installCommand = CommandUI { | |
commandDefaultFlags = (mempty, mempty, mempty, mempty), | ||
commandOptions = \showOrParseArgs -> | ||
liftOptions get1 set1 | ||
-- Note: [Hidden Flags] | ||
-- hide "constraint", "dependency", and | ||
-- "exact-configuration" from the configure options. | ||
(filter ((`notElem` ["constraint", "dependency" | ||
, "exact-configuration"]) | ||
. optionName) $ | ||
configureOptions showOrParseArgs) | ||
++ liftOptions get2 set2 (configureExOptions showOrParseArgs ConstraintSourceCommandlineFlag) | ||
++ liftOptions get3 set3 (installOptions showOrParseArgs) | ||
++ liftOptions get3 set3 | ||
-- hide "target-package-db" flag from the | ||
-- install options. | ||
(filter ((`notElem` ["target-package-db"]) | ||
. optionName) $ | ||
installOptions showOrParseArgs) | ||
++ liftOptions get4 set4 (haddockOptions showOrParseArgs) | ||
} | ||
where | ||
|
@@ -1678,6 +1688,12 @@ installOptions showOrParseArgs = | |
"Do not install anything, only print what would be installed." | ||
installDryRun (\v flags -> flags { installDryRun = v }) | ||
trueArg | ||
|
||
, option "" ["target-package-db"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we make this a hidden option? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you give me a pointer where I can find a hidden option? I've tried looking for hiddenOption, and anything with hidden and option, but didn't turn anything up. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"package database to install into. Required when using ${pkgroot} prefix." | ||
installDest (\v flags -> flags { installDest = v }) | ||
(reqArg "DATABASE" (succeedReadE (Flag . Cabal.CopyToDb)) | ||
(\f -> case f of Flag (Cabal.CopyToDb p) -> [p]; _ -> [])) | ||
] ++ | ||
|
||
optionSolverFlags showOrParseArgs | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a Haddock comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.