dub icon indicating copy to clipboard operation
dub copied to clipboard

Ability to pre-fetch dependencies without unpacking into cache

Open arrowd opened this issue 4 months ago • 4 comments
trafficstars

Hey Dub team. I'm looking into integrating Dub into FreeBSD Ports framework to allow creating ports for D software.

FreeBSD Ports require all distribution files making up a build to be downloadable as a separate build step. Distfiles are placed into a directory called DISTDIR. During the actual build DISTDIR is available as a read-only location and usually contain source archives that gets extracted into WRKDIR and the build proceeds as usual.

The env DUB_HOME=${DISTDIR}/dub fetch -r ... does almost what I need, but there are issues with it:

  • It unpacks downloaded archives
  • I will then have to pass DUB_HOME=${DISTDIR}/dub to dub build, but this directory would be readonly.

Ideally, I'd like to have an ability to just download an archive file for a given package into a specified dir with dub fetch and then point dub build to that directory. Would it be possible to implement?

arrowd avatar Jun 26 '25 11:06 arrowd