git.iko.soy/typeable/cabal2nix
on master help sign in
test: the cabal2nix executable test needs to specify the target OS, too

Fixes https://github.com/NixOS/nixpkgs/issues/43574.

commitad6e8850f0bf4980472267f5bcc15e16b58cc6fb authorPeter Simons <simons@cryp.to> dateMon 16 Jul 2018, 21:01 (8 years ago) parentc7420eb
1 file changed+5−2
test/Main.hs+5−2
test/Main.hs+5−2
@@ -78,7 +78,10 @@ testLibrary cabalFile = do
7878-- some temporary location that is empty.
7979--
8080-- * Run this test with different kinds of encodings.
81−
81+--
82+-- * Run tests with a different target OS, like Darwin. The packages "iconv",
83+-- "crypt-sha512", "gl" might be worthwhile for testing since their output
84+-- differs on Darwin.
8285
8386testExecutable :: FilePath -> FilePath -> TestTree
8487testExecutable exe cabalFile = do
@@ -89,7 +92,7 @@ testExecutable exe cabalFile = do
8992 (\ref new -> ["diff", "-u", ref, new])
9093 goldenFile
9194 nixFile
92− (callCommand (unwords ["env LANG=en_US.UTF-8", exe, "--sha256=deadbeef", "--compiler=ghc-8.2", "--", cabalFile, ">"++nixFile]))
95+ (callCommand (unwords ["env LANG=en_US.UTF-8", exe, "--sha256=deadbeef", "--system=x86_64-linux", "--compiler=ghc-8.2", "--", cabalFile, ">"++nixFile]))
9396
9497-------------------------------------------------------------------------------
9598-- * Helper functions