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

docopt.cpp: init at 0.6.2 #23400

Merged
merged 1 commit into from Mar 27, 2017
Merged

docopt.cpp: init at 0.6.2 #23400

merged 1 commit into from Mar 27, 2017

Conversation

knedlsepp
Copy link
Member

Motivation for this change

docopt.cpp is an awesome alternative to Boost.Program_options.

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.

rev = "v${version}";
sha256 = "1rgkc8nsc2zz2lkyai0y68vrd6i6kbq63hm3vdza7ab6ghq0n1dd";
};

Copy link
Contributor

Choose a reason for hiding this comment

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

cmake should be in nativeBuildInputs


checkPhase = "python ./run_tests";

meta = with stdenv.lib; {
Copy link
Contributor

Choose a reason for hiding this comment

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

no need of writing stdenv.lib in license and platforms when you do meta = with stdenv.lib

@knedlsepp
Copy link
Member Author

@ndowens: Thanks for the review. I removed the stdenv.lib redundancy and made both cmake and python (which is used only for the unit tests) compile time dependencies.

@knedlsepp
Copy link
Member Author

Oh wait. I get it, python shouldn't be a nativeBuildInput. I'll change that back.

@knedlsepp knedlsepp force-pushed the add_docopt_cpp branch 2 times, most recently from 8c731f7 to 48066ec Compare March 3, 2017 08:04
@fpletz
Copy link
Member

fpletz commented Mar 4, 2017

@knedlsepp If python is only used for the tests it should be in nativeBuildInputs. 😄

@knedlsepp
Copy link
Member Author

knedlsepp commented Mar 4, 2017

@fpletz: I'm new to cross compiling and confused. When the library is built, it is built in a way that it can be run on some target system. Why do we need the test-dependencies built for the host system? Can the build host even run the cross-compiled tests?

@knedlsepp
Copy link
Member Author

@fpletz: Could you shed some light on why python belongs into nativeBuildInputs?

@ndowens
Copy link
Contributor

ndowens commented Mar 8, 2017 via email

@knedlsepp
Copy link
Member Author

Well it is actually used to run it, but only during the checkPhase, so it's not perfectly obvious to me.

@joachifm
Copy link
Contributor

What about the build error https://travis-ci.org/NixOS/nixpkgs/jobs/207280770

@knedlsepp
Copy link
Member Author

@joachifm: Oh. Thanks for pointing that out!

@knedlsepp
Copy link
Member Author

@joachifm: I forced an LD_LIBRARY_PATH during the checkPhase, so the unit test binaries can properly find the library. What's your opinion on the native v. non-native issue?

@joachifm
Copy link
Contributor

Putting python in nativeBuildInputs make sense insofar that it runs on the build machine (native here refers to the build machine).

I agree with your point that if code generated for the host cannot run on the build machine, then the build machine cannot perform tests that involve executing said code, without some sort of compatibility mechanism. As far as Hydra is concerned, I think it's always the case that build=host (at least such that host code can run on build).

@knedlsepp
Copy link
Member Author

knedlsepp commented Mar 27, 2017

Ok. Thanks for your clarifications. I added python to the nativeBuildInputs.

@joachifm joachifm merged commit 07a76cc into NixOS:master Mar 27, 2017
@knedlsepp knedlsepp deleted the add_docopt_cpp branch December 15, 2017 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants