git.iko.soy/typeable/cabal2nix
on master help sign in
Add support for more Cabal platforms

This adds support for all of the architectures listed in `nixpkgs/lib/systems/platforms.nix`.

commit09efe4dd9a1c7bccdd5e56b6416763ceb1e89ca7 authorBen Gamari <ben@smart-cactus.org> dateSun 25 Mar 2018, 16:19 (9 years ago) parent13ff907
1 file changed+8−1
src/Cabal2nix.hs+8−1
src/Cabal2nix.hs+8−1
@@ -100,7 +100,14 @@ readP p = eitherReader $ \s -> case [ r' | (r',"") <- P.readP_to_S p s ] of
100100 _ -> Left ("invalid value " ++ show s)
101101
102102parsePlatform :: P.ReadP r Platform
103−parsePlatform = do arch <- P.choice [P.string "i686" >> return I386, P.string "x86_64" >> return X86_64]
103+parsePlatform = do arch <- P.choice [ P.string "i686" >> return I386
104+ , P.string "x86_64" >> return X86_64
105+ , P.string "armv7l" >> return Arm
106+ , P.string "armv6l" >> return Arm
107+ -- Not yet supported yet, see Cabal #5221
108+ --, P.string "aarch64" >> return AArch64
109+ , P.string "mipsel" >> return Mips
110+ ]
104111 _ <- P.char '-'
105112 os <- P.choice [ P.string "linux" >> return Linux, P.string "darwin" >> return OSX
106113 , P.string "windows" >> return Windows]