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

buck: init at v2017.05.31.01 #26438

Merged
merged 3 commits into from
Jun 8, 2017
Merged

buck: init at v2017.05.31.01 #26438

merged 3 commits into from
Jun 8, 2017

Conversation

jgertm
Copy link
Contributor

@jgertm jgertm commented Jun 7, 2017

Motivation for this change

This PR introduces the buck build tool, developed at Facebook. It contains merely the static .pex file generated by buck build buck, not the recommended mutable directory that buck uses to satisfy the version specified by a project's .buckversion file.

Such is life in Nixistan.

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.


postPatch = ''
for f in $(grep -l -r '/bin/bash'); do
substituteInPlace "$f" --replace '/bin/bash' '${bash}/bin/bash'
Copy link
Member

@Mic92 Mic92 Jun 8, 2017

Choose a reason for hiding this comment

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

Do you only replace shebangs here? If so, add bash as buildInput and use patchShebangs . here.

Copy link
Member

Choose a reason for hiding this comment

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

it is not only used as shebang.

install -D -m755 buck-out/gen/programs/buck.pex $out/bin/buck
wrapProgram $out/bin/buck \
--prefix PYTHONPATH : $PYTHONPATH \
--prefix PATH : "${stdenv.lib.makeBinPath [jre watchman]}"
Copy link
Member

@Mic92 Mic92 Jun 8, 2017

Choose a reason for hiding this comment

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

It requires java at run-time. Please check that whether jre or jdk is required here.

Copy link
Member

Choose a reason for hiding this comment

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

jre_headless might be also an option to reduce the closure size.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

buck is primarily used as a Java build tool, so I think it's okay to include JDK.

@Mic92
Copy link
Member

Mic92 commented Jun 8, 2017

Did you also test to build projects in some languages? Java, C++, Android etc?


stdenv.mkDerivation rec {

let
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This seems to have no purpose.

@jgertm
Copy link
Contributor Author

jgertm commented Jun 8, 2017

It builds a really big Clojure codebase, so I think it checks out on that front.

@Mic92 Mic92 merged commit ff139c4 into NixOS:master Jun 8, 2017
@Mic92
Copy link
Member

Mic92 commented Jun 8, 2017

Thanks!

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