git.iko.soy/typeable/cabal2nix
on master help sign in
Update submodules handling to incorporate hlint suggestion.
commita033fd137d32a033ff05edae367c19bf8f2174f3 authorKevin Quick <kquick@galois.com> dateSat 11 Aug 2018, 17:45 (8 years ago) parente347b37
1 file changed+2−2
src/Distribution/Nixpkgs/Fetch.hs+2−2
src/Distribution/Nixpkgs/Fetch.hs+2−2
@@ -79,11 +79,11 @@ fetch :: forall a.
7979 -- This is required, because we cannot always check if a download succeeded otherwise.
8080 -> Source -- ^ The source to fetch from.
8181 -> IO (Maybe (DerivationSource, a)) -- ^ The derivation source and the result of the processing function. Returns Nothing if the download failed.
82−fetch s f = runMaybeT . fetchers where
82+fetch optSubModules f = runMaybeT . fetchers where
8383 fetchers :: Source -> MaybeT IO (DerivationSource, a)
8484 fetchers source = msum . (fetchLocal source :) $ map (\fetcher -> fetchWith fetcher source >>= process)
8585 [ (False, "url", [])
86− , (True, "git", if s then ["--fetch-submodules"] else [])
86+ , (True, "git", ["--fetch-submodules" | optSubModules ])
8787 , (True, "hg", [])
8888 , (True, "svn", [])
8989 , (True, "bzr", [])