3 ms·
I've mostly associated Tweag with Nix-related content, so this is an interesting change. That said, it's interesting to me that there hasn't been a better Nix-
by mikepurvis 4y ago
I've mostly associated Tweag with Nix-related content, so this is an interesting change.
That said, it's interesting to me that there hasn't been a better Nix-Bazel bridge. Right now the story for packaging Bazel projects in Nix is really awful. You basically have Bazel run its "deps" phase, and all that stuff gets stored as a singular, gargantuan, fixed output derivation, and if you ever try to change the deps, you have to just know that you have to twiddle this magic hash [1] or it'll happily go on with the cached deps. But then, of course, every build is from scratch.
A "real" Bazel story for Nix would integrate the two binary caches together, so that Nix would be aware of what Bazel was building, and the individual cached elements of it could go into the Nix store as separate entries— then you'd be able to actually get incremental builds. But I assume this would require Bazel's binary cache implementation to be pluggable.
[1]: https://github.com/NixOS/nixpkgs/blob/21321a6381fd8d3660fe1cdc0485fbb5978112ce/pkgs/development/python-modules/tensorflow/default.nix#L362-L371= https://github.com/NixOS/nixpkgs/blob/21321a6381fd8d3660fe1c...