Fork me on GitHub
#babashka-sci-dev
<
2022-05-20
>
borkdude10:05:36

@thiagokokada https://twitter.com/k0kada/status/1527597540681596930 Where do those binaries get built for macOS aarch64, I imagine someone must run a machine somewhere for this to work right?

kokada10:05:25

On hydra, that is the nixpkgs CI/CD: https://hydra.nixos.org/build/177587246

borkdude10:05:48

This is amazing. But how do they do it?

kokada10:05:15

Well, we have a very big pool of machines that does the build

kokada10:05:43

I am not sure, but should be

borkdude10:05:56

What is the fastest way for me to download a binary for babashka 0.8.2 from this and redistribute it?

borkdude10:05:02

I could then recommend that approach to people who want to use the m1 binary

kokada10:05:52

There should be a less convoluted way, but what I got: • Go to this link and get the Output store paths (in this example it is /nix/store/i0h0cs4kadrpfass23rd37g7wnw76b0s-babashka-0.8.2): https://hydra.nixos.org/build/177587246#tabs-detailsnix copy --from /nix/store/i0h0cs4kadrpfass23rd37g7wnw76b0s-babashka-0.8.2cp /nix/store/i0h0cs4kadrpfass23rd37g7wnw76b0s-babashka-0.8.2/bin/bb .

borkdude10:05:56

how long does it generally take for the bb package to be updated there?

kokada10:05:09

Generally a few days

borkdude10:05:13

e.g. if I want to do a release, and upload the binary to Github releases, how long do I wait?

borkdude10:05:16

ah right...

kokada10:05:46

Once the PR is merged, it will enter on the master branch and eventually it will be evaluated by a Hydra Job.

kokada10:05:57

Once this Hydra job finishes, one of the channels will be updated

kokada10:05:16

I got this from the staging-next channel, but a better one would be from nixpkgs-unstable

kokada10:05:08

I wouldn't say this is the best way to distribute the binaries, but it can be an alternative until you have a proper CI

borkdude10:05:33

We don't have any nixos instructions here: https://github.com/babashka/babashka#installation Perhaps we can make them and then point m1 users to that

borkdude10:05:02

I prefer not to wait a few days to be able to upload the binary

kokada10:05:08

Well, like I said, this is not a proper CI, and it only works in this specific case because macOS builds on GraalVM are always static

kokada10:05:18

It is just a possible alternative until you have a proper CI

borkdude10:05:47

yes, I mean, if m1 users really want the m1 binary they can use nix. So we should document where to start with that

kokada11:05:42

Let me see if I can make a somewhat user friendly way to use babashka with nix, even if "technically" wrong

borkdude11:05:10

We can make a separate page in doc about nix perhaps with a longer, more correct instructions for people who want to seriously use it

kokada11:05:44

Yeah, I think it makes sense, but I also think that some people just want something to use

kokada11:05:58

And also I am not sure if I am the best person to write this page

borkdude11:05:37

Well I am certainly not and something is better than nothing, is my take on that. But perhaps we can poke someone in #nix for that