NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.44k stars 13.64k forks source link

Package request: more Bazel versions #339241

Open samvv opened 2 weeks ago

samvv commented 2 weeks ago

Project description

Metadata

There are already the following Bazel versions present in nixpkgs:

However, many times a piece of software requires a specific Bazel version. When building e.g. skia, it requires Bazel version 6.3.2.

I tried Bazelisk but any binary installed with the tool gives the classic:

Could not start dynamically linked executable: /home/samvv/.cache/bazelisk/downloads/sha256/794f58b5a5c28c4729f04db0bd1238eaf827105bb49946238b00f681a1da377c/bin/bazel
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld

I'm new to Nix but I'm willing to put time and effort into making this happen.


Add a :+1: reaction to issues you find important.

samvv commented 2 weeks ago

One question that arises is how to do version numbers. Right now the bazel package is suffixed with an underscore and the major version number, while python seems to be using no underscores.

For full version numbers, python omits the . and the patch number in the version number, but this means that version 1.11 and version 11.1 will collide. Personally, I think it's much safer to make the . explicit. Maybe something like bazel_7_2_1, and while at it, why not a more standard bazel-7-2-1?

Thoughts?

eclairevoyant commented 2 weeks ago

Underscores are standard; python violates our general guidelines on this. That being said, I don't see nixpkgs realistically supporting more than 1 version per major version, I'll leave @NixOS/bazel to confirm on this.

samvv commented 2 weeks ago

I don't see nixpkgs realistically supporting more than 1 version per major version

That's a shame, because the tool bazelisk is broken and that basically leaves me with little options on NixOS to actually build Skia.