Skip to content

Commit

Permalink
Fix template haskell patch
Browse files Browse the repository at this point in the history
To disable template haskell, we do a sed on some aeson input files.
Apparently this has changed between verions. Careful that this may
break older version of aeson.
  • Loading branch information
matthewbauer committed Jun 15, 2018
1 parent 05091f3 commit 5a6d0e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ let overrideCabal = pkg: f: if pkg == null then null else haskellLib.overrideCab
ghcIosSimulator64 = (extendHaskellPackages nixpkgsCross.ios.simulator64.pkgs.haskell.packages.ghc842).override {
overrides = nixpkgs.lib.foldr nixpkgs.lib.composeExtensions (_: _: {}) [
(optionalExtension enableExposeAllUnfoldings haskellOverlays.exposeAllUnfoldings)
haskellOverlays.disableTemplateHaskell
haskellOverlays.ghc-8_4_2
];
};
Expand Down
2 changes: 1 addition & 1 deletion haskell-overlays/disable-template-haskell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ in self: super: {
# Export all modules, and some additional functions
preConfigure = ''
sed -i '/^library/,/^test-suite/ s/other-modules:/exposed-modules:/' *.cabal
sed -i "/^module Data.Aeson.TH/,/) where/ { /^module/b; /) where/ { s/) where/, LookupField (..), parseTypeMismatch, parseTypeMismatch', valueConName, keyValuePairWith) where/; b }; }" Data/Aeson/TH.hs
sed -i "/^module Data.Aeson.TH/,/) where/ { /^module/b; /) where/ { s/) where/, LookupField (..), parseTypeMismatch, parseTypeMismatch', valueConName) where/; b }; }" Data/Aeson/TH.hs
${drv.preConfigure or ""}
'';
});
Expand Down

0 comments on commit 5a6d0e2

Please sign in to comment.