diff --git a/tags/lib.nix b/tags/lib.nix index 3d5de8c..b5a21a4 100644 --- a/tags/lib.nix +++ b/tags/lib.nix @@ -149,6 +149,7 @@ let prePatch = '' patch -p1 --batch -u -i ${./patch-process-manager.txt} patch -p1 --batch -u -i ${./patch-jar-tool.txt} + patch -p1 --batch -u -i ${./patch-coursier-fetch.txt} ''; preBuild = '' diff --git a/tags/patch-coursier-fetch.txt b/tags/patch-coursier-fetch.txt new file mode 100644 index 0000000..45c96c4 --- /dev/null +++ b/tags/patch-coursier-fetch.txt @@ -0,0 +1,38 @@ +diff --git a/src/python/pants/jvm/resolve/coursier_setup.py b/src/python/pants/jvm/resolve/coursier_setup.py +index 153fc3bae..ba4137438 100644 +--- a/src/python/pants/jvm/resolve/coursier_setup.py ++++ b/src/python/pants/jvm/resolve/coursier_setup.py +@@ -17,7 +17,7 @@ from pants.core.util_rules.external_tool import ( + ExternalToolRequest, + TemplatedExternalTool, + ) +-from pants.core.util_rules.system_binaries import BashBinary ++from pants.core.util_rules.system_binaries import BashBinary, MkdirBinary + from pants.engine.fs import CreateDigest, Digest, FileContent, MergeDigests + from pants.engine.platform import Platform + from pants.engine.process import Process +@@ -81,7 +81,7 @@ COURSIER_FETCH_WRAPPER_SCRIPT = textwrap.dedent( # noqa: PNT20 + "$coursier_exe" fetch {repos_args} \ + --json-output-file="$json_output_file" \ + "${{@//{coursier_working_directory}/$working_dir}}" +- /bin/mkdir -p classpath ++ {mkdir} -p classpath + {python_path} {coursier_bin_dir}/coursier_post_processing_script.py "$json_output_file" + """ + ) +@@ -271,6 +271,7 @@ async def setup_coursier( + coursier_subsystem: CoursierSubsystem, + python: PythonBuildStandaloneBinary, + platform: Platform, ++ mkdir: MkdirBinary, + ) -> Coursier: + repos_args = ( + " ".join(f"-r={shlex.quote(repo)}" for repo in coursier_subsystem.repos) + " --no-default" +@@ -280,6 +281,7 @@ async def setup_coursier( + coursier_working_directory=Coursier.working_directory_placeholder, + python_path=shlex.quote(python.path), + coursier_bin_dir=shlex.quote(Coursier.bin_dir), ++ mkdir=shlex.quote(mkdir.path), + ) + + post_process_stderr = POST_PROCESS_COURSIER_STDERR_SCRIPT.format(python_path=python.path)