3 ms·
How does Bob handle network requirements (downloading dependencies during the build)? I think that is one of the biggest pain points for nix packaing. Many proj
by yewenjie 4y ago
How does Bob handle network requirements (downloading dependencies during the build)? I think that is one of the biggest pain points for nix packaing. Many projects have build instructions that depend on downloading stuff in a complex manner that cannot be easily abstracted/shaped to what Nix expects.
- zuzuleinen 4y agoI wrote a short guide[1] how bob uses Nix, but essentially we still use `nix-build` under the hood to build a list of packages you give under dependencies > Many projects have build instructions that depend on downloading stuff in a complex manner that cannot be easily abstracted/shaped to what Nix expects. Are you referring here to packages which are not available in Nixpkgs? [1] https://bob.build/docs/usage/package-management https://bob.build/docs/usage/package-management
- rgoulter 4y agoThe point is: a couple of the tough points in packaging something with Nix are "how to come up with the Nix expression", but also how to get the software you're packaging to build with the constraints Nix has (no fetching external dependencies, shared libraries explicitly declared in non-standard locations, etc.). A bespoke YAML format is arguably not simpler than just "here's the equivalent Nix expression". But, sure, can be more accessible for some people. But, providing a nice facade over the Nix language doesn't help with cases of where Nix can be difficult to work with.
- zuzuleinen 4y ago> But, providing a nice facade over the Nix language doesn't help with cases of where Nix can be difficult to work with. This is true. If you reach the point where you need to write your own Nix expression you currently can become stuck. But I think these are problems that are waiting to be solved. There are folks are already working on a new language tutorial at nix.dev for example and other tools that can abstract some of the problems we have now can be built. I believe we are still in an early stage when it come to reproducibility and we just have to keep working at it.
- ParetoOptimal 4y ago> Many projects have build instructions that depend on downloading stuff in a complex manner that cannot be easily abstracted/shaped to what Nix expects. The basic way to fix this with nix is: 1) download the thing with a fixed ouput derivation: a derivation who's source has the URL and checksum of the artifact 2) copy the artifact from the nix store where said build tool stores it
- rgoulter 4y agoIn nix expressions, sure; but bob uses YAML, and uses that to drive nix.
- deleted 4y ago[deleted]
- zuzuleinen 4y agoYes, basically you can list your packages in the yaml file and have them installed. But you can also add .nix expression files in the same bob.yaml that can be used to build your packages when a package is not found on Nixpkgs.