git.iko.soy/typeable/cabal2nix
on master help sign in
Replace fromMaybe&M.lookup with M.findWithDefault
commit2ac1163bdefdfcd0c55c7735031923e27b54d1cc authorViktar Basharymau <6alliapumob@gmail.com> dateTue 15 Sep 2015, 17:28 (11 years ago) parentd0a5561
1 file changed+2−2
hackage2nix/src/Main.hs+2−2
hackage2nix/src/Main.hs+2−2
@@ -161,8 +161,8 @@ main = do
161161 drv :: Derivation
162162 drv = fromGenericPackageDescription haskellResolver nixpkgsResolver targetPlatform (compilerInfo config) flagAssignment [] descr
163163 & src .~ DerivationSource "url" ("mirror://hackage/" ++ display pkgId ++ ".tar.gz") "" sha256
164− & metaSection.hydraPlatforms %~ (`Set.difference` fromMaybe Set.empty (Map.lookup (PackageName name) (dontDistributePackages config)))
165− & metaSection.maintainers .~ fromMaybe Set.empty (Map.lookup (PackageName name) globalPackageMaintainers)
164+ & metaSection.hydraPlatforms %~ (`Set.difference` Map.findWithDefault Set.empty (PackageName name) (dontDistributePackages config))
165+ & metaSection.maintainers .~ Map.findWithDefault Set.empty (PackageName name) globalPackageMaintainers
166166 & metaSection.hydraPlatforms %~ (if isInDefaultPackageSet then id else const Set.empty)
167167
168168 overrides :: Doc