Replies: 5 comments
-
I'm also having issues on NixOS. The usual ELF patching is not working, the CLI then spits out this error:
A static build works fine. |
Beta Was this translation helpful? Give feedback.
-
@eboskma good to know! It looks like there's a NixOS package but it's installing via node? NixOS/nixpkgs#149333 |
Beta Was this translation helpful? Give feedback.
-
I made a PR for this in #6914 |
Beta Was this translation helpful? Give feedback.
-
Ah, I missed that one, thanks for pointing it out. I was using the tailwind cli through the elixir package in an Elixir Phoenix project, and by default that downloads the executable from GitHub, which does not work on NixOS. |
Beta Was this translation helpful? Give feedback.
-
I'm here to make that package work for me as well 😁 |
Beta Was this translation helpful? Give feedback.
-
Checking in here before I submit a drive-by PR :)
The current linux binaries are dynamically linked, which means they don't work out of the box (and give a confusing error) on minimal linux systems such as Alpine. You can see examples at #6690 and phoenixframework/tailwind#7 . The user would have to know that "not found" when running a binary indicates that a dynamically linked library is missing and know to install both
build-base
andgcompat
.We can't fix the confusing errors, but we can ship statically linked binaries.
Addressing some possible concerns:
File size
When I built it on my machine the static builds actually took up less space than dynamic
Native bindings
The pkg README indicates that "native addons" are not available when statically packaging -- I don't believe tailwindcss uses them and the linux static binary worked correctly when I tested it.
I think testing the linux binary as part of CI would be a good addition - I suggested doing so here: #6784
The change itself is pretty trivial (mveytsman@4b5cc15) and I'm happy to submit this as a PR if the team thinks it's good :)
Beta Was this translation helpful? Give feedback.
All reactions