git.iko.soy/typeable/cabal2nix
on master help sign in
Cabal2Nix/Package.hs: sort all lists of strings without distinguishing upper-/lower case
commit6c9717c05ca0dd21af07e20d8858b480e9d2e0e4 authorPeter Simons <simons@cryp.to> dateMon 15 Aug 2011, 00:38 (15 years ago) parent9646e58
1 file changed+2−2
src/Cabal2Nix/Package.hs+2−2
src/Cabal2Nix/Package.hs+2−2
@@ -11,7 +11,7 @@ import Distribution.NixOS.Derivation.Cabal
1111import Cabal2Nix.Name
1212import Cabal2Nix.CorePackages
1313import Data.List
14−-- import Data.Char
14+import Data.Char
1515
1616cabal2nix :: Cabal.GenericPackageDescription -> Derivation
1717cabal2nix cabal = MkDerivation
@@ -62,7 +62,7 @@ quote '"' = "\\\""
6262quote c = [c]
6363
6464normalizeList :: [String] -> [String]
65−normalizeList = nub . sort {- By (\x y -> compare (map toLower x) (map toLower y)) -}
65+normalizeList = nub . sortBy (\x y -> compare (map toLower x) (map toLower y))
6666
6767normalizeNixNames :: [String] -> [String]
6868normalizeNixNames = normalizeList . map toNixName