purple-plastic-57801
12/02/2023, 3:43 AMfile(
name="downloaded-sass",
source=per_platform(
macos_x86_64=http_source(
url="<https://github.com/sass/dart-sass/releases/download/1.69.5/dart-sass-1.69.5-macos-x64.tar.gz>",
len=3457742,
sha256="75e29a5bd76069abf2532c9a4b36b164f1c91a461452f0fbdc4167fd1685550c",
filename="sass.tar.gz",
),
linux_x86_64=http_source(
url="<https://github.com/sass/dart-sass/releases/download/1.69.5/dart-sass-1.69.5-linux-x64.tar.gz>",
len=3697303,
sha256="42b3d7b82098432f80d057da5e7464e96e6cd8d90827a9e3a47974f39c930218",
filename="sass.tar.gz",
),
),
)
shell_command(
name="extracted-sass",
command="tar -zxvf sass.tar.gz",
tools=["tar", "gzip"],
execution_dependencies=[":downloaded-sass"],
output_directories=["dart-sass"],
root_output_directory="./dart-sass"
)
run_shell_command(
name="sass",
command="XDG_CONFIG_DIRS=${CHROOT}:$XDG_CONFIG_DIRS {chroot}/sass $@",
workdir="/",
execution_dependencies=[":extracted-sass"],
)
purple-plastic-57801
12/02/2023, 3:46 AMpurple-plastic-57801
12/02/2023, 3:47 AMadhoc_tool(
name="css",
runnable="//third_party/sass",
args = ["--style", "compressed", "style/style.css", "static/style.css"],
execution_dependencies=[":style"],
output_directories=["static"],
root_output_directory="."
)
archive(name="archive", files=[":css"], format="zip")
I get
NotImplementedError: Running this target type within the sandbox is not yet supported.
bitter-ability-32190
12/02/2023, 3:49 AMpurple-plastic-57801
12/02/2023, 3:49 AMlate-advantage-75311
12/02/2023, 11:48 AMshell_command
rather than run_shell_command
to generate and wrap sources. https://pantsbuild.slack.com/archives/C046T6T9U/p1680709417133039?thread_ts=1674580234.158039&cid=C046T6T9U and suchlate-advantage-75311
12/02/2023, 11:49 AMadhoc_tool
does codegen for everything but shell commands, but you can use shell_command
independently for codegen that you can capture.purple-plastic-57801
12/02/2023, 5:42 PM