on iko/ghcjs-patch-master help sign in
Patch th-utilities for windows cross compile (#1114)
74d51c1Hamish Mackenzie
overlays/patches/th-utilities.patchnew file+52
@@ -0,0 +1,52 @@
1+diff --git a/src/TH/RelativePaths.hs b/src/TH/RelativePaths.hs
2+index e74a5fc..ca7d209 100644
3+--- a/src/TH/RelativePaths.hs
4++++ b/src/TH/RelativePaths.hs
5+@@ -25,7 +25,6 @@ import qualified Data.Text.IO as T
6+ import qualified Data.Text.Lazy as LT
7+ import qualified Data.Text.Lazy.IO as LT
8+ import Language.Haskell.TH (Q, Loc(loc_filename), location, runIO, reportWarning)
9+-import Language.Haskell.TH.Syntax (addDependentFile)
10+ import System.Directory (getDirectoryContents, getCurrentDirectory, setCurrentDirectory, canonicalizePath)
11+ import System.FilePath
12+
13+@@ -35,7 +34,6 @@ import System.FilePath
14+ qReadFileBS :: FilePath -> Q BS.ByteString
15+ qReadFileBS fp = do
16+ fp' <- pathRelativeToCabalPackage fp
17+- addDependentFile fp'
18+ runIO $ BS.readFile fp'
19+
20+ -- | Reads a file as a lazy ByteString. The path is specified relative
21+@@ -44,7 +42,6 @@ qReadFileBS fp = do
22+ qReadFileLBS :: FilePath -> Q LBS.ByteString
23+ qReadFileLBS fp = do
24+ fp' <- pathRelativeToCabalPackage fp
25+- addDependentFile fp'
26+ runIO $ LBS.readFile fp'
27+
28+ -- | Reads a file as a strict Text. The path is specified relative
29+@@ -53,7 +50,6 @@ qReadFileLBS fp = do
30+ qReadFileText :: FilePath -> Q T.Text
31+ qReadFileText fp = do
32+ fp' <- pathRelativeToCabalPackage fp
33+- addDependentFile fp'
34+ runIO $ T.readFile fp'
35+
36+ -- | Reads a file as a lazy Text. The path is specified relative
37+@@ -62,7 +58,6 @@ qReadFileText fp = do
38+ qReadFileLazyText :: FilePath -> Q LT.Text
39+ qReadFileLazyText fp = do
40+ fp' <- pathRelativeToCabalPackage fp
41+- addDependentFile fp'
42+ runIO $ LT.readFile fp'
43+
44+ -- | Reads a file as a String. The path is specified relative
45+@@ -71,7 +66,6 @@ qReadFileLazyText fp = do
46+ qReadFileString :: FilePath -> Q String
47+ qReadFileString fp = do
48+ fp' <- pathRelativeToCabalPackage fp
49+- addDependentFile fp'
50+ runIO $ readFile fp'
51+
52+ -- | Runs the 'Q' action, temporarily setting the current working
overlays/windows.nix+1
@@ -112,6 +112,7 @@ final: prev:
112 x509-system.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ./patches/x509-system-1.6.6.patch ];
112 x509-system.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ./patches/x509-system-1.6.6.patch ];
113 file-embed.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ./patches/file-embed.patch ];
113 file-embed.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ./patches/file-embed.patch ];
114 file-embed-lzma.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ./patches/file-embed-lzma-0.patch ];
114 file-embed-lzma.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ./patches/file-embed-lzma-0.patch ];
115+ th-utilities.patches = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isWindows [ ./patches/th-utilities.patch ];
115
116
116 # Set all of these to [], as these form the
117 # Set all of these to [], as these form the
117 # dependency graph of the libiserv, iserv-proxy, and iserv-remote
118 # dependency graph of the libiserv, iserv-proxy, and iserv-remote