4 ms·
How are you integrating bazel and nix? My assumption is that bazel is running in an environment created by nix, so I wonder what you mean by 'deeply integrated
by wocram 4y ago
How are you integrating bazel and nix?
My assumption is that bazel is running in an environment created by nix, so I wonder what you mean by 'deeply integrated'.
- benreesman 4y agoThe devil as always is in the details, but in the broad strokes we have a pretty uniform/composable way to float stuff from the Nix store into Starlark and thereby put all of nixpkgs within Bazel’s reach. Doing like custom Bazel cc_toolchain stuff against Nix wrappers is, uh, an adventure. But you grind away at it and now you’ve got the C toolchain you want. Wash/rinse/repeat for all the other languages you use and before you know it you’ve got Nix’s determinism and Bazel’s crazy fast build times. When I was at FB there were dozens if not hundreds of serious hackers working on this sort of thing, and they were fucking good at their jobs, but technology usually moves forward with time and this setup smokes where FB was at in 2018. I don’t know what they’re up to now, I bet it’s good.
- wocram 4y agoI have spent a little bit of time working on a prototype of a setup like this, and have needed to write a lot of (hacky) glue and BUILD files. I take it you have departed quite a bit from https://github.com/tweag/rules_nixpkgs https://github.com/tweag/rules_nixpkgs ? Are you generating BUILD.bazel files for nixpkgs, or are you doing that by hand?
- atom_arranger 4y agoLearning about these kinds of things is one thing motivating me to try for a big tech company job. I want to build my own company, but I want it to have this kind of tooling, that I don’t fully understand yet. Sounds really interesting, would love to see it used more.
- benreesman 4y agoI don’t know what the conventional wisdom is these days, but speaking for myself, I felt much more equipped to tackle the huge undertaking of being more entrepreneurial after seeing how a really serious software shop is run. As for getting the big company job, it’s a weird time over like the last two months and the next two months, but this will soon pass. Everyone hates leetcode interviews. I hated being interviewed in that format, and I hated interviewing in that format. It is what it is. It’s a test like the SAT or LSAT or GMAT or anything, arguably not as hard. It’s basically nothing to do with the job at the lower seniorities. I think people would be less psyched out about it if they viewed it the same as cramming for any other test. A high score on the LSAT doesn’t make you a good lawyer, it’s a loose proxy metric at best, and you game it by studying. By virtue of a) hanging out on HN and b) hanging out in a thread about Nix you’re clearly curious and paying attention, so go get that marquee job, and take the experience with you when you start your venture! I’ll be rooting for your success!