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
bazel-deps: init at 2018-05-31 #43018
Conversation
|
||
buildBazelPackage rec { | ||
name = "bazel-deps"; | ||
version = "2018-05-31"; |
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.
When we use a date as the version we don't put the hyphens in it, because hyphens have other meanings in the names. Can you use 20180531?
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.
No, “The date must be in "YYYY-MM-DD" format.”: https://nixos.org/nixpkgs/manual/#sec-package-naming. (There is also an "-unstable" suffix requirement, but it seems better to skip it for packages that do not plan to do versioned releases.)
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.
Thanks for the correction!
{ stdenv, buildBazelPackage, lib, fetchFromGitHub, git, jre, makeWrapper }: | ||
|
||
buildBazelPackage rec { | ||
name = "bazel-deps"; |
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 add the version to the name: name = "bazel-deps-${version}";
cp bazel-bin/src/scala/com/github/johnynek/bazel_deps/parseproject_deploy.jar $out/bin/bazel-bin/src/scala/com/github/johnynek/bazel_deps | ||
''; | ||
}; | ||
} |
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.
I'm not familiar with buildBazelPackage, but it seems like the meta attribute might be missing here.
done | ||
find . -type d -empty -delete | ||
popd | ||
''; |
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 you add some Bash comments that explain the goals of this preInstall
?
Thanks for the reviews, comments addressed. |
@GrahamcOfBorg build bazel-deps |
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: bazel-deps Partial log (click to expand)
|
Failure on x86_64-linux (full log) Attempted: bazel-deps Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Attempted: bazel-deps Partial log (click to expand)
|
Is this because it uses
That's exactly the hash I get on my Linux and Nixos boxes, so I must have something wrong on my darwin box. |
No, this is a temporary error in host name resolution. It almost never happens on properly set up hosts and I have not seen it from the bot before, but it is possible. (EDIT: /cc @grahamc)
Could you copy the store path from the Darwin box onto the Linux box (with |
Yeah I did that and the difference is on Darwin the deps don't include the source jars, just the code jars, but on Linux the deps include the source jars. Other than that they're the same, and both are deterministic. I'm checking whether it has something to do with having Maven installed or not. |
@GrahamcOfBorg build bazel-deps |
I remember I saw this and thought it was suspicious: bazelbuild/bazel#4798. |
You will need to apply for this by sending a PR to https://github.com/NixOS/ofborg (see other PRs). @GrahamcOfBorg build bazel-deps
Nix builds in a clean directory. Bazel may be guessing your home directory from your user id, or it may be communicating with the already running daemon. You may (or may not) be able to affect this by setting some environment variables (such as |
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: bazel-deps Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: bazel-deps Partial log (click to expand)
|
Failure on x86_64-linux (full log) Attempted: bazel-deps Partial log (click to expand)
|
eda961c
to
6005815
Compare
Found it, the state survives between one build and the next in the |
I've also submitted NixOS/ofborg#192, thanks for running the builds for me in the meantime. |
So this was not an accident, but a sandbox restriction: the fetch derivation (configured with |
1f1f806
to
bb12088
Compare
Addressed review. I haven't been able to build it on nixOS, because my nixOS box is slightly broken after the latest virtualbox update. |
@GrahamcOfBorg build bazel-deps |
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: bazel-deps Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: bazel-deps Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: bazel-deps Partial log (click to expand)
|
Thank you! Could you explain a bit, why did you find it easier to work without nix hacks than with them? |
In this case neither was necessary, the external workspaces are up to date and pass the check, and the scala compilation does not use any environment variables from outside. Before this PR the only derivation using |
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)