Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cabal2nix/src/Cabal2nix.hs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ data Options = Options
, optDoBenchmark :: Bool
, optRevision :: Maybe String
, optHyperlinkSource :: Bool
, optCabalFileSha256 :: Maybe String
, optCabalRevision :: Maybe Int
, optEnableLibraryProfiling :: Bool
, optEnableExecutableProfiling :: Bool
, optEnableProfiling :: Maybe Bool
Expand Down Expand Up @@ -99,6 +101,10 @@ options = do
<- optional (strOption $ long "revision" <> help "revision to use when fetching from VCS")
optHyperlinkSource
<- flag True False (long "no-hyperlink-source" <> help "don't generate pretty-printed source code for the documentation")
optCabalFileSha256
<- optional (strOption $ long "cabal-file-sha256" <> metavar "HASH" <> help "sha256 hash of the revised .cabal file (sets editedCabalFile in output)")
optCabalRevision
<- optional (option auto $ long "cabal-file-revision" <> metavar "N" <> help "revision number of the .cabal file (sets revision in output)")
optEnableLibraryProfiling
<- switch (long "enable-library-profiling" <> help "enable library profiling in the generated build")
optEnableExecutableProfiling
Expand Down Expand Up @@ -239,6 +245,8 @@ processPackage Options{..} pkg = do
& doCheck &&~ optDoCheck
& doBenchmark ||~ optDoBenchmark
& extraFunctionArgs %~ Set.union (Set.fromList ("inherit lib":map (fromString . ("inherit " ++)) optExtraArgs))
& maybe id (set editedCabalFile) optCabalFileSha256
& maybe id (set revision) optCabalRevision

shell :: Doc
shell = vcat
Expand Down
Loading