Skip to content

Commit

Permalink
Provide Data.Aeson.GADT from aeson-gadt-th's Data.Aeson.GADT.TH
Browse files Browse the repository at this point in the history
Fixes #28
  • Loading branch information
Ericson2314 committed Jan 23, 2019
1 parent 54e9a1f commit 5a529a0
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 156 deletions.
154 changes: 0 additions & 154 deletions common/Data/Aeson/GADT.hs

This file was deleted.

3 changes: 2 additions & 1 deletion common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
, mime-mail, monad-control, monad-logger, monoidal-containers, mtl
, network-uri, reflex, resource-pool, stdenv, template-haskell
, text, these, time, transformers, transformers-base, vector
, aeson-gadt-th
, hostPlatform
}:
mkDerivation {
Expand All @@ -16,7 +17,7 @@ mkDerivation {
dependent-sum file-embed filepath http-types mime-mail
monad-control monoidal-containers mtl network-uri
reflex resource-pool template-haskell text these time transformers
transformers-base vector
transformers-base vector aeson-gadt-th
] ++ (if hostPlatform.libc == "bionic" || hostPlatform.isAarch64 then [] else [
monad-logger
]);
Expand Down
5 changes: 4 additions & 1 deletion common/rhyolite-common.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ library

build-depends:
aeson
, aeson-gadt-th
, async
, attoparsec
, base
Expand Down Expand Up @@ -41,7 +42,6 @@ library
, vector

exposed-modules:
Data.Aeson.GADT
Data.MonoidMap
Rhyolite.Account
Rhyolite.Api
Expand All @@ -58,6 +58,9 @@ library
Rhyolite.TH
Rhyolite.WebSocket

reexported-modules:
aeson-gadt-th:Data.Aeson.GADT.TH as Data.Aeson.GADT

if !os(ios) && !arch(aarch64) && !arch(arm) && !impl(ghcjs)
build-depends: monad-logger
other-extensions: TemplateHaskell
Expand Down
9 changes: 9 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,16 @@ let
};
};

# TODO use `hackGet`, or even better `thunkSet` for all of them.
# (Both are from reflex-platform.)
srcs = {
# TODO bump cabal hashes and use Hackage version.
aeson-gadt-th = let
json = builtins.fromJSON (builtins.readFile ./dep/aeson-gadt-th/github.json);
in pkgs.fetchFromGitHub {
inherit (json) owner repo rev sha256;
private = json.private or false;
};
constraints-extras = pkgs.fetchFromGitHub {
owner = "obsidiansystems";
repo = "constraints-extras";
Expand Down
7 changes: 7 additions & 0 deletions dep/aeson-gadt-th/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# DO NOT HAND-EDIT THIS FILE
import ((import <nixpkgs> {}).fetchFromGitHub (
let json = builtins.fromJSON (builtins.readFile ./github.json);
in { inherit (json) owner repo rev sha256;
private = json.private or false;
}
))
7 changes: 7 additions & 0 deletions dep/aeson-gadt-th/github.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"owner": "obsidiansystems",
"repo": "aeson-gadt-th",
"branch": "master",
"rev": "f4c173747c8b83cb201975b5ce8c9c7e33f9b7fc",
"sha256": "18dva9sgg93s79m973qmc1j52jard6yq3ficxhwmzzy5yri6rry6"
}

0 comments on commit 5a529a0

Please sign in to comment.