Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: self-extracting extra-source #5914

Open
kit-ty-kate opened this issue Apr 8, 2024 · 1 comment
Open

Feature request: self-extracting extra-source #5914

kit-ty-kate opened this issue Apr 8, 2024 · 1 comment

Comments

@kit-ty-kate
Copy link
Member

kit-ty-kate commented Apr 8, 2024

It is sometimes needed to download an extra tarball and extract it somewhere during the build process (e.g. when the tarball doesn't contain the source of a git submodule)
However currently extra-source doesn't allow to extract tarballs contrary to url.
An option could be added like:

extra-source "tarball.tar.gz" {
  src: "path-to-tarball.tar.gz"
  checksum: "xzy"
  extract-to: "vendor/my-vendored-package"
}

The only way to do this currently is to call tar, mv and so manually which is often not very portable and not very user-friendly.

Examples include at least:

@dra27
Copy link
Member

dra27 commented Apr 15, 2024

This approach would be more elegant, but note that both the flexdll and winpthreads already do this slightly more portably by installing the sources instead: e.g. winpthreads.20240209-1.opam uses this .install file.

The downside is that the sources live in the switch, so it's only really viable if the submodule is very small.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants