You can, and I have done it. It's easy for hello world. But for larger projects it's more difficult.
If anyone has even done a build of clang with this, I'd love to know!
If anyone has even done a build of clang with this, I'd love to know!
Clang's in Alpine Linux's repo's, so I guess they have and this is how: https://git.alpinelinux.org/aports/tree/main/clang
nix-build -A pkgsStatic.llvmPackages.clang-unwrapped
Which built all the other deps just fine, but failed buildling LLVM with CONFIGURE_LLVM_NATIVE. That seems easy enough to fix, as that's the regular part, though.No guarantee there wouldn't be other more serious issues lurking beneath, but we've attempted quite a lot of static builds of complicated thing, augmented Musl with various bits and scraps to make it more featureful.
You gave a very nice intro for my talk, saying Nixpkgs could well be the future so check it out. Well, I hope that future can arive more widely soon :).