8 ms·
I think for the goal of "produce Java, dotnet, php packages (with a Rust dependency) for different platforms", this as such is something Nix isn't geared toward
by rgoulter 4y ago
I think for the goal of "produce Java, dotnet, php packages (with a Rust dependency) for different platforms", this as such is something Nix isn't geared towards.
Nix essentially relies on all its packages (and their linked dependencies) ending up under /nix/store. -- I'm not sure how easy it is to then take native shared libraries from /nix/store, and then distribute these to systems which don't have /nix/store.
Whereas, say, applications could be bundled using nix bundle. https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-bundle.html https://nixos.org/manual/nix/unstable/command-ref/new-cli/ni...
That said, I think Nix could still otherwise make a useful addition to the project. Something like https://devenv.sh/ https://devenv.sh/ would make setting up a development environment (especially for multiple languages) much easier.
- maxmcd 4y agoI mean I think part of the difficulty with understanding/using Nix is that you can do anything with it. You could set up a nix shell with all the dependencies you need to build the libraries, then build them "outside" of nix with something like `nix-shell --run`. You'd then at least have a reproducible environment for running builds. You could alternatively build out libraries to a /nix/store with a derivation and then use nix's own tooling to ensure that the outputted files had no runtime dependencies on other nix dependencies. From there you could freely copy them from the store. In both situation I think you could take advantage of Nix's various cross-compilation support.