Skip to content

Commit 829cba5

Browse files
authored
Fix lookup-sha256 test for musl and windows cross (#558)
1 parent 7fb8f56 commit 829cba5

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

test/lookup-sha256/default.nix

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ haskell-nix, testSrc } :
1+
{ pkgs, lib, stdenv, haskell-nix, testSrc, zlib } :
22
let
33
pandoc = haskell-nix.hackage-package {
44
name = "pandoc";
@@ -10,6 +10,23 @@ let
1010
{ "https://github.com/jgm/pandoc-citeproc"."0.17"
1111
= "0dxx8cp2xndpw3jwiawch2dkrkp15mil7pyx7dvd810pwc22pm2q"; }
1212
."${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+
];
1330
};
1431
in
1532
pandoc.components.exes.pandoc

0 commit comments

Comments
 (0)