git.iko.soy/typeable/cabal2nix
on master help sign in
Remove cruft from Normalize.hs.
b8925e8Peter Simons
distribution-nixpkgs/src/Distribution/Nixpkgs/Haskell/FromCabal/Normalize.hs−26
@@ -27,15 +27,6 @@ normalizeBuildInfo (PackageName pname) bi = bi
27 & haskell %~ Set.filter (\b -> view localName b /= fromString pname)
27 & haskell %~ Set.filter (\b -> view localName b /= fromString pname)
28 & tool %~ Set.filter (\b -> view localName b /= fromString pname)
28 & tool %~ Set.filter (\b -> view localName b /= fromString pname)
29
29
30− {-
31− {
32− , testDepends = normalizeNixNames (Set.delete pname testDepends)
33− , extraLibs = normalizeNixLibs extraLibs
34− , pkgConfDeps = normalizeNixLibs pkgConfDeps
35− , configureFlags = normalizeSet configureFlags
36− }
37−-}
38−
39normalizeMeta :: Meta -> Meta
30normalizeMeta :: Meta -> Meta
40normalizeMeta meta = meta
31normalizeMeta meta = meta
41 & description %~ normalizeSynopsis
32 & description %~ normalizeSynopsis
@@ -54,23 +45,6 @@ quote ('"':cs) = '\\' : '"' : quote cs
54quote (c:cs) = c : quote cs
45quote (c:cs) = c : quote cs
55quote [] = []
46quote [] = []
56
47
57−-- normalizeSet :: Set String -> Set String
58−-- normalizeSet = Set.filter (not . null)
59−
60−-- normalizeNixNames :: Set String -> Set String
61−-- normalizeNixNames = normalizeSet . Set.map toNixName
62−
63−-- normalizeNixLibs :: Set String -> Set String
64−-- normalizeNixLibs = normalizeSet . Set.fromList . concatMap libNixName . Set.toList
65−
66−-- normalizeNixBuildTools :: Set Identifier -> Set Identifier
67−-- normalizeNixBuildTools = Set.fromList . concatMap buildToolNixName . Set.toList
68−
69−-- normalizePlatforms :: Set String -> Set String
70−-- normalizePlatforms = normalizeSet . Set.map
71−-- (\p -> if '.' `elem` p then p else "stdenv.lib.platforms." ++ p)
72−
73−
74-- |When a flag is specified multiple times, the first occurrence
48-- |When a flag is specified multiple times, the first occurrence
75-- counts. This is counter-intuitive, IMHO, but it's how cabal does it.
49-- counts. This is counter-intuitive, IMHO, but it's how cabal does it.
76-- Flag names are spelled in all lowercase.
50-- Flag names are spelled in all lowercase.