@@ -4,21 +4,21 @@ def _impl(repository_ctx):
44 build_file = Label ("//misc/ripunzip:BUILD.ripunzip.bazel" )
55 if repository_ctx .os .name == "linux" :
66 repository_ctx .download_and_extract (
7- url = "%s/ripunzip_%s-1_amd64.deb" % (url_prefix , version ),
8- sha256 = repository_ctx .attr .sha256_linux ,
9- canonical_id = "ripunzip-linux" ,
10- output = "deb" ,
7+ url = "%s/ripunzip_%s-1_amd64.deb" % (url_prefix , version ),
8+ sha256 = repository_ctx .attr .sha256_linux ,
9+ canonical_id = "ripunzip-linux" ,
10+ output = "deb" ,
1111 )
1212 repository_ctx .extract (
1313 "deb/data.tar.xz" ,
14- strip_prefix = "usr" ,
14+ strip_prefix = "usr" ,
1515 )
1616 elif repository_ctx .os .name == "windows" :
1717 repository_ctx .download_and_extract (
18- url = "%s/ripunzip_v%s-x86_64-pc-windows-msvc.zip" % (url_prefix , version ),
19- canonical_id = "ripunzip-windows" ,
20- sha256 = repository_ctx .attr .sha256_windows ,
21- output = "bin" ,
18+ url = "%s/ripunzip_v%s-x86_64-pc-windows-msvc.zip" % (url_prefix , version ),
19+ canonical_id = "ripunzip-windows" ,
20+ sha256 = repository_ctx .attr .sha256_windows ,
21+ output = "bin" ,
2222 )
2323 elif repository_ctx .os .name == "mac os x" :
2424 arch = repository_ctx .os .arch
@@ -33,23 +33,23 @@ def _impl(repository_ctx):
3333 else :
3434 fail ("Unsupported macOS architecture: %s" % arch )
3535 repository_ctx .download_and_extract (
36- url = "%s/ripunzip_v%s-%s.tar.gz" % (url_prefix , version , suffix ),
37- sha256 = sha256 ,
38- canonical_id = canonical_id ,
39- output = "bin" ,
36+ url = "%s/ripunzip_v%s-%s.tar.gz" % (url_prefix , version , suffix ),
37+ sha256 = sha256 ,
38+ canonical_id = canonical_id ,
39+ output = "bin" ,
4040 )
4141 else :
4242 fail ("Unsupported OS: %s" % repository_ctx .os .name )
4343 repository_ctx .file ("WORKSPACE.bazel" )
4444 repository_ctx .symlink (build_file , "BUILD.bazel" )
4545
4646ripunzip_archive = repository_rule (
47- implementation = _impl ,
48- attrs = {
49- "version" : attr .string (mandatory = True ),
50- "sha256_linux" : attr .string (mandatory = True ),
51- "sha256_windows" : attr .string (mandatory = True ),
52- "sha256_macos_intel" : attr .string (mandatory = True ),
53- "sha256_macos_arm" : attr .string (mandatory = True ),
47+ implementation = _impl ,
48+ attrs = {
49+ "version" : attr .string (mandatory = True ),
50+ "sha256_linux" : attr .string (mandatory = True ),
51+ "sha256_windows" : attr .string (mandatory = True ),
52+ "sha256_macos_intel" : attr .string (mandatory = True ),
53+ "sha256_macos_arm" : attr .string (mandatory = True ),
5454 },
5555)
0 commit comments