on iko/ghcjs-patch-master help sign in
Fix lookup-sha256 test for musl and windows cross (#558)
829cba5Hamish Mackenzie
test/lookup-sha256/default.nix+18−1
@@ -1,4 +1,4 @@
1−{ haskell-nix, testSrc } :
1+{ pkgs, lib, stdenv, haskell-nix, testSrc, zlib } :
2let
2let
3 pandoc = haskell-nix.hackage-package {
3 pandoc = haskell-nix.hackage-package {
4 name = "pandoc";
4 name = "pandoc";
@@ -10,6 +10,23 @@ let
10 { "https://github.com/jgm/pandoc-citeproc"."0.17"
10 { "https://github.com/jgm/pandoc-citeproc"."0.17"
11 = "0dxx8cp2xndpw3jwiawch2dkrkp15mil7pyx7dvd810pwc22pm2q"; }
11 = "0dxx8cp2xndpw3jwiawch2dkrkp15mil7pyx7dvd810pwc22pm2q"; }
12 ."${location}"."${tag}";
12 ."${location}"."${tag}";
13+ modules = [
14+ # Windows characters confuse cross compilation
15+ # See https://github.com/snoyberg/file-embed/pull/33
16+ {
17+ packages.file-embed.src = pkgs.fetchgit {
18+ url = "https://github.com/hamishmack/file-embed.git";
19+ rev = "12b33b8b710517308954c1facff3dc679c2dc5e3";
20+ sha256 = "0jcpja4s4cylmg9rddyakb1p1fb4l41ffwmy0njpb1dxc5z3v618";
21+ };
22+ }
23+ # Musl needs static zlib
24+ (lib.optionalAttrs stdenv.hostPlatform.isMusl {
25+ packages.pandoc.components.exes.pandoc.configureFlags = [
26+ "--ghc-option=-optl=-L${zlib.static}/lib"
27+ ];
28+ })
29+ ];
13 };
30 };
14in
31in
15 pandoc.components.exes.pandoc
32 pandoc.components.exes.pandoc