Skip to content

Commit

Permalink
chore: Update to new third_party method for haskell deps.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Nov 7, 2023
1 parent d809322 commit a4827f5
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ bazel-opt_task:
- /src/workspace/tools/inject-repo hs-toxcore-c
test_all_script:
- cd /src/workspace && bazel test -k
--remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST
--config=ci
//hs-toxcore-c/...
27 changes: 13 additions & 14 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load("@ai_formation_hazel//tools:mangling.bzl", "hazel_library")
load("@rules_haskell//haskell:defs.bzl", "haskell_library")
load("//third_party/haskell/hspec-discover:build_defs.bzl", "hspec_test")
load("//tools/project:build_defs.bzl", "project")
Expand All @@ -14,11 +13,11 @@ haskell_library(
deps = [
"//c-toxcore",
"//hs-msgpack-binary",
hazel_library("QuickCheck"),
hazel_library("base"),
hazel_library("bytestring"),
hazel_library("generic-arbitrary"),
hazel_library("quickcheck-instances"),
"//third_party/haskell:QuickCheck",
"//third_party/haskell:base",
"//third_party/haskell:bytestring",
"//third_party/haskell:generic-arbitrary",
"//third_party/haskell:quickcheck-instances",
],
)

Expand All @@ -28,13 +27,13 @@ hspec_test(
deps = [
":hs-toxcore-c",
"//hs-msgpack-binary",
hazel_library("QuickCheck"),
hazel_library("base"),
hazel_library("base16-bytestring"),
hazel_library("bytestring"),
hazel_library("cryptohash"),
hazel_library("hspec"),
hazel_library("saltine"),
hazel_library("vector"),
"//third_party/haskell:QuickCheck",
"//third_party/haskell:base",
"//third_party/haskell:base16-bytestring",
"//third_party/haskell:bytestring",
"//third_party/haskell:cryptohash",
"//third_party/haskell:hspec",
"//third_party/haskell:saltine",
"//third_party/haskell:vector",
],
)
3 changes: 1 addition & 2 deletions test/Network/Tox/Types/EventsSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ toxIterate countdown toxes = do
spec :: Spec
spec = do

return ()
{- TODO(iphydf): re-enable once the c-toxcore system PR is in.
describe "event serialisation format" $ do
it "is linear encoding" $
Expand All @@ -62,6 +61,7 @@ spec = do
property $ \(sort -> events) -> do
events' <- C.toxEventsToPtr events >>= C.toxEventsFromPtr
sort <$> events' `shouldBe` Right events
-}

describe "toxcore" $
it "can bootstrap" $ do
Expand All @@ -72,4 +72,3 @@ spec = do
must $ C.toxBootstrap tox2 "127.0.0.1" bootstrapPort bootstrapKey

toxIterate 100 [tox1, tox2]
-}
19 changes: 9 additions & 10 deletions tools/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load("@ai_formation_hazel//tools:mangling.bzl", "hazel_library")
load("@rules_haskell//haskell:defs.bzl", "haskell_binary")

haskell_binary(
Expand All @@ -7,10 +6,10 @@ haskell_binary(
deps = [
"//hs-schema",
"//hs-toxcore-c",
hazel_library("base"),
hazel_library("bytestring"),
hazel_library("data-fix"),
hazel_library("groom"),
"//third_party/haskell:base",
"//third_party/haskell:bytestring",
"//third_party/haskell:data-fix",
"//third_party/haskell:groom",
],
)

Expand All @@ -19,10 +18,10 @@ haskell_binary(
srcs = ["groupbot.hs"],
deps = [
"//hs-toxcore-c",
hazel_library("base"),
hazel_library("base16-bytestring"),
hazel_library("bytestring"),
hazel_library("directory"),
hazel_library("text"),
"//third_party/haskell:base",
"//third_party/haskell:base16-bytestring",
"//third_party/haskell:bytestring",
"//third_party/haskell:directory",
"//third_party/haskell:text",
],
)

0 comments on commit a4827f5

Please sign in to comment.