File tree Expand file tree Collapse file tree 2 files changed +8
-15
lines changed
Expand file tree Collapse file tree 2 files changed +8
-15
lines changed Original file line number Diff line number Diff line change 11def _dmg_archive_impl (repository_ctx ):
2- hdiutil = repository_ctx .which ( "hdiutil" )
3- if not hdiutil :
4- # Create BUILD with expected targets so queries succeed; builds will fail with missing files
5- repository_ctx . file ( "BUILD.bazel" , repository_ctx . attr . build_file_content )
2+ repository_ctx .file ( "BUILD.bazel" , repository_ctx . attr . build_file_content )
3+
4+ if not repository_ctx . which ( "hdiutil" ):
5+ # hdiutil is macOS-only; skip download on other platforms
66 return
77
88 url = repository_ctx .attr .url
@@ -33,11 +33,6 @@ def _dmg_archive_impl(repository_ctx):
3333 output = repository_ctx .attr .output ,
3434 )
3535
36- repository_ctx .file (
37- "BUILD.bazel" ,
38- repository_ctx .attr .build_file_content ,
39- )
40-
4136dmg_archive = repository_rule (
4237 _dmg_archive_impl ,
4338 attrs = {
Original file line number Diff line number Diff line change 11def _pkg_archive_impl (repository_ctx ):
2- pkgutil = repository_ctx .which ( "pkgutil" )
3- if not pkgutil :
4- # Create BUILD with expected targets so queries succeed; builds will fail with missing files
5- repository_ctx . file ( "BUILD.bazel" , repository_ctx . attr . build_file_content )
2+ repository_ctx .file ( "BUILD.bazel" , repository_ctx . attr . build_file_content )
3+
4+ if not repository_ctx . which ( "pkgutil" ):
5+ # pkgutil is macOS-only; skip download on other platforms
66 return
77
88 url = repository_ctx .attr .url
@@ -33,8 +33,6 @@ def _pkg_archive_impl(repository_ctx):
3333 for (key , value ) in repository_ctx .attr .move .items ():
3434 repository_ctx .execute (["mv" , pkg_name + "/" + key , value ])
3535
36- repository_ctx .file ("BUILD.bazel" , repository_ctx .attr .build_file_content )
37-
3836pkg_archive = repository_rule (
3937 _pkg_archive_impl ,
4038 attrs = {
You can’t perform that action at this time.
0 commit comments