git.iko.soy/typeable/cabal2nix
on master help sign in
Cosmetic, no functional change.
cbf4889Peter Simons
src/Cabal2Nix.hs+9−8
@@ -39,14 +39,15 @@ main = bracket (return ()) (\() -> hFlush stdout >> hFlush stderr) $ \() -> do
39 ]
39 ]
40
40
41 usage :: String
41 usage :: String
42− usage = usageInfo "Usage: cabal2nix [options] url-to-cabal-file" options ++
42+ usage = usageInfo "Usage: cabal2nix [options] url-to-cabal-file" options ++ unlines
43− "\n\
43+ [ ""
44− \Recognized URI schemes:\n\
44+ , "Recognized URI schemes:"
45− \\n\
45+ , ""
46− \ cabal://pkgname-pkgversion download the specified package from Hackage\n\
46+ , " cabal://pkgname-pkgversion download the specified package from Hackage"
47− \ http://host/path fetch the Cabel file via HTTP\n\
47+ , " http://host/path fetch the Cabel file via HTTP"
48− \ file:///local/path load the Cabal file from the local disk\n\
48+ , " file:///local/path load the Cabal file from the local disk"
49− \ /local/path abbreviated version of file URI\n"
49+ , " /local/path abbreviated version of file URI"
50+ ]
50
51
51 cmdlineError :: String -> IO a
52 cmdlineError :: String -> IO a
52 cmdlineError "" = hPutStrLn stderr usage >> exitFailure
53 cmdlineError "" = hPutStrLn stderr usage >> exitFailure
src/Hackage4Nix.hs+16−15
@@ -183,21 +183,22 @@ main = bracket (return ()) (\() -> hFlush stdout >> hFlush stderr) $ \() -> do
183 ]
183 ]
184
184
185 usage :: String
185 usage :: String
186− usage = usageInfo "Usage: hackage4nix [options] [dir-or-file ...]" options ++
186+ usage = usageInfo "Usage: hackage4nix [options] [dir-or-file ...]" options ++ unlines
187− "\n\
187+ [ ""
188− \The purpose of 'hackage4nix' is to keep all Haskell packages in our\n\
188+ , "The purpose of 'hackage4nix' is to keep all Haskell packages in our"
189− \repository packages up-to-date. It scans a checked-out copy of\n\
189+ , "repository packages up-to-date. It scans a checked-out copy of"
190− \Nixpkgs for expressions that use 'cabal.mkDerivation', and\n\
190+ , "Nixpkgs for expressions that use 'cabal.mkDerivation', and"
191− \re-generates them in-place with cabal2nix.\n\
191+ , "re-generates them in-place with cabal2nix."
192− \\n\
192+ , ""
193− \Because we don't want to generate a barrage of HTTP requests during\n\
193+ , "Because we don't want to generate a barrage of HTTP requests during"
194− \that procedure, the tool expects a copy of the Hackage database\n\
194+ , "that procedure, the tool expects a copy of the Hackage database"
195− \available at some local path, i.e. \"/dev/shm/hackage\" by default.\n\
195+ , "available at some local path, i.e. \"/dev/shm/hackage\" by default."
196− \That directory can be set up as follows:\n\
196+ , "That directory can be set up as follows:"
197− \\n\
197+ , ""
198− \ cabal update\n\
198+ , " cabal update"
199− \ mkdir -p /dev/shm/hackage\n\
199+ , " mkdir -p /dev/shm/hackage"
200− \ tar xf ~/.cabal/packages/hackage.haskell.org/00-index.tar -C /dev/shm/hackage\n"
200+ , " tar xf ~/.cabal/packages/hackage.haskell.org/00-index.tar -C /dev/shm/hackage\n"
201+ ]
201
202
202 cmdlineError :: String -> IO a
203 cmdlineError :: String -> IO a
203 cmdlineError "" = hPutStrLn stderr usage >> exitFailure
204 cmdlineError "" = hPutStrLn stderr usage >> exitFailure