Skip to content
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

buildbot: assorted cleanups #23642

Merged
merged 1 commit into from Mar 8, 2017
Merged

Conversation

copumpkin
Copy link
Member

Some changes to be more idiomatic and use stdenv building blocks more. I also added a buildbot.withPlugins instead of the current plugins mechanism, which forces an unnecessary rebuild of the package and reruns all the tests. This should be equivalent and more pleasant to use in practice.

cc @FRidh @nand0p

Motivation for this change

I mostly got frustrated with waiting for buildbot tests to rerun every time I changed a dependency. When poking around I saw a few un-idiomatic things in the expression so I changed those too.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

let
withPlugins = plugins: runCommand "wrapped-${package.name}" { buildInputs = [ makeWrapper ]; } ''
makeWrapper ${package}/bin/buildbot $out/bin/buildbot \
--set PYTHONPATH ${lib.makeSearchPathOutput "lib" pythonPackages.python.sitePackages plugins}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FRidh turns out this actually works 😄 when I tested it (which led to me opening that other issue) I accidentally passed in the wrong set of packages so was testing the wrong thing!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Earlier there was a PR to change --prefix PYTHONPATH to --set PYTHONPATH. I didn't want that because PYTHONPATH is still a Python feature. That's the reason we now patch scripts. Now you break that feature ;-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Err, just realized these don't stack nicely. Going to push a fix now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FRidh should I use --prefix then? I mostly don't expect external callers to supply reasonable nix-compatible values here, but no harm in letting them shoot themselves I guess.

@copumpkin copumpkin force-pushed the buildbot-cleanup branch 2 times, most recently from 7a14f11 to 49b20e5 Compare March 8, 2017 16:28
@copumpkin
Copy link
Member Author

@FRidh pushed fix to use --prefix 😄

Some changes to be more idiomatic and use stdenv building blocks more.
I also added a `buildbot.withPlugins` instead of the current plugins
mechanism, which forces an unnecessary rebuild of the package and reruns
all the tests. This should be equivalent and more pleasant to use in
practice.
@copumpkin copumpkin merged commit a53d5cf into NixOS:master Mar 8, 2017
@copumpkin
Copy link
Member Author

Thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants