NixCon2024 Integrating Nix and Buck2 for fun and profit

NixCon2024 Integrating Nix and Buck2 for fun and profit

483 Lượt nghe
NixCon2024 Integrating Nix and Buck2 for fun and profit
2024-10-26 15:5516:20 Speaker: Claudio Bley In a large code base you want a tool that is able to build your project quickly by leveraging features such as a distributed cache and remote execution. At the same time it is important that your build is correct and thus reproducible. In this talk I will present how we integrated Nix with Buck2, an open source build system developed by Meta, in order to achieve highly granular, reproducible builds for a large Haskell code base and how we were able to use Buck2's remote execution with Nix. In this talk I will quickly introduce Buck2 and the project we are working on to explain the goals we were aiming to achieve in regard to the developer experience. In brief, Buck2 should be the main entry point to the project – providing a buck2 binary in a dev shell is all that is needed to get a developer going on the project. Therefore, we developed a fine-grained mechanism for introducing nix packages as dependencies in our build using nix flakes. I will deep dive into the internals of this integration, demonstrate how easy it is to use, and how we can speed up the build even more using a distributed cache and remote execution.