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

[new release] esbuild (0.14.34) #21170

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 33 additions & 0 deletions packages/esbuild/esbuild.0.14.34/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
opam-version: "2.0"
synopsis: "Esbuild prebuild command line on opam"
description: """Esbuild prebuild command line on opam."""
maintainer: ["Thibaut Mattio"]
authors: ["Thibaut Mattio"]
license: "ISC"
homepage: "https://github.com/tmattio/opam-esbuild"
doc: "https://tmattio.github.io/opam-esbuild/"
bug-reports: "https://github.com/tmattio/opam-esbuild/issues"
dev-repo: "git+https://github.com/tmattio/opam-esbuild.git"
install: [
"cp"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should use the .install file. This cannot work due to the sandbox:

[ERROR] The installation of esbuild failed at "cp esbuild-linux-x64 /home/opam/.opam/4.02/bin/esbuild".
- cp: cannot stat 'esbuild-linux-x64': No such file or directory

#=== ERROR while installing esbuild.0.14.34 ===================================#
# context              2.1.2 | linux/x86_64 | ocaml-base-compiler.4.02.3 | pinned(https://github.com/tmattio/opam-esbuild/releases/download/0.14.34/esbuild-0.14.34.tbz)
# path                 ~/.opam/4.02/.opam-switch/build/esbuild.0.14.34
# command              ~/.opam/opam-init/hooks/sandbox.sh install cp esbuild-linux-x64 /home/opam/.opam/4.02/bin/esbuild
# exit-code            1
# env-file             ~/.opam/log/esbuild-32-f3df4f.env
# output-file          ~/.opam/log/esbuild-32-f3df4f.out
### output ###
# cp: cannot stat 'esbuild-linux-x64': No such file or directory

It is also a bit weird. Normally opam is to compile sources and install, not to copy pre-built binaries. Would it be possible to have esbuild work like the other opam packages?

"esbuild-linux-arm64" {os = "linux" & arch = "arm64"}
"esbuild-linux-x64" {os = "linux" & arch = "x86_64"}
"esbuild-macos-arm64" {os = "macos" & arch = "arm64"}
"esbuild-macos-x64" {os = "macos" & arch = "x86_64"}
"esbuild-windows-x64.exe" {os = "windows" & arch = "x86_64"}
"%{bin}%/esbuild"
]
available: [
( (os = "linux" & (arch = "x86_64" | arch = "arm64"))
| (os = "macos" & (arch = "x86_64" | arch = "arm64"))
| (os = "windows" & arch = "x86_64"))
]
url {
src:
"https://github.com/tmattio/opam-esbuild/releases/download/0.14.34/esbuild-0.14.34.tbz"
checksum: [
"sha256=e13f1e37838d8c5c4050cf991cff8e9d51dedce4af7bc0fd9d8b4bcab3b72f00"
"sha512=be5d58834682d409203f57c0f7c9bdc2f74b8ec4a644c57a285ab8adc6f03907639d350192de81697c129b5165110905e3038236e44c3cd8feff9304153611b1"
]
}
x-commit-hash: "4d7f3432d3e7f0dc15473e0714db60c21dcba714"