New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Bazel buildtools #41194
Add Bazel buildtools #41194
Conversation
dc192f2
to
547d59b
Compare
Sorry, I had rebased it onto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rest is fine. I tested the package
|
||
buildGoPackage rec { | ||
name = "buildifier"; | ||
version = "588d90030bc8054b550967aa45a8a8d170deba0b"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please you day of commit as version, because this can be numerical sorted (needed for nix-env) and is human-readable. rev
then will be the sha256
|
||
buildGoPackage rec { | ||
name = "buildozer"; | ||
version = "588d90030bc8054b550967aa45a8a8d170deba0b"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too.
|
||
buildGoPackage rec { | ||
name = "unused_deps"; | ||
version = "588d90030bc8054b550967aa45a8a8d170deba0b"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too.
Please also make one commit per package:
|
repo = "buildtools"; | ||
rev = "${version}"; | ||
sha256 = "18q1z138545kh4s5k0jcqwhpzc1w7il4x00l7yzv9wq8bg1vn1rv"; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can reuse the source here:
inherit (buildifier) src;
version = "588d90030bc8054b550967aa45a8a8d170deba0b"; | ||
|
||
goPackagePath = "github.com/bazelbuild/buildtools"; | ||
subPackages = [ "buildifier" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or is it possible to build multiple subPackages in one go?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's possible, but then it wouldn't be possible to choose the tools to instantiate individually. Is that ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be solved by outputs. If someone needs this, this can be implemented on demand.
547d59b
to
403f9d4
Compare
One single derivation now. I still added separate attributes to |
@Mic92 ping |
Motivation for this change
Adds three new derivations for https://github.com/bazelbuild/buildtools .
These are added as three completely separate derivations, even though they're all carbon copies of each other, because the three are independent, so they can be updated independently, and in fact in some cases will have to be updated independently, as a certain version of one of the tools might be incompatible with the other tools built on the same commit.
Still the repetition is pretty ugly, so I'm open to suggestions on how to refactor it.
Also open to suggestions on what the commit message should be, as I don't think the one I've put now is quite in line with the guidelines.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)