-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
490 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
test_ghc_version = "8.10.4" | ||
test_stack_snapshot = "lts-18.0" | ||
test_asterius_version = "0.0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
load("@bazel_skylib//lib:paths.bzl", "paths") | ||
|
||
def _asterius_toolchain_impl(ctx): | ||
ahc_dist = None | ||
for file in ctx.files.binaries: | ||
basename_no_ext = paths.split_extension(file.basename)[0] | ||
if basename_no_ext == "ahc-dist": | ||
ahc_dist = file | ||
if ahc_dist == None: | ||
fail("ahc-dist was not found when defining the asterius toolchain") | ||
|
||
return [ | ||
platform_common.ToolchainInfo( | ||
name = ctx.label.name, | ||
ahc_dist = ahc_dist, | ||
tools = ctx.files.tools, | ||
), | ||
] | ||
|
||
asterius_toolchain = rule( | ||
_asterius_toolchain_impl, | ||
attrs = { | ||
"binaries": attr.label_list( | ||
mandatory = True, | ||
doc = "The asterius top level wrappers", | ||
), | ||
"tools": attr.label_list( | ||
mandatory = True, | ||
doc = "The complete asterius bundle, which is needed to execute the wrappers.", | ||
), | ||
}, | ||
doc = "Toolchain for asterius tools that are not part of the regular haskell toolchain", | ||
) |
Oops, something went wrong.