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

jp: init at 0.1.2 #17131

Merged
merged 1 commit into from
Jul 22, 2016
Merged

jp: init at 0.1.2 #17131

merged 1 commit into from
Jul 22, 2016

Conversation

cransom
Copy link
Contributor

@cransom cransom commented Jul 20, 2016

Motivation for this change

It's not that we really need more JSON parsers in the world, but AWS happened to choose an implementation and embedded it in their CLI tools. This is a standalone utility into that library.

Things done
  • Tested using sandboxing
    (nix.useChroot on NixOS,
    or option build-use-chroot in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • OS X
    • 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.

A json parson tool based on the JMESPATH query language.
http://jmespath.org/

@@ -2141,6 +2143,8 @@ in
gcc = gcc49; # doesn't build with gcc5
};

jp = (callPackage ../development/tools/jp { }).bin // { outputs = [ "bin" ]; };
Copy link
Member

Choose a reason for hiding this comment

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

I see some other derivations doing this but it seems a little backwards to me... Shouldn't "outputs" be in jp/default.nix and not here? I guess it's fine but I don't see why you would override outputs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't quite follow at first either, but I looked at a few of the other Go apps and copied the behavior. Crawling through nixpkgs looking at how Go packages were created, I found https://nixos.org/releases/nixpkgs/nixpkgs-16.09pre86545.65ac26e/manual/#ex-buildGoPackage which mentions how it generates multiple outputs. Running a nix-build . -A jp.all or jp.bin got what I wanted but thats not the normal experience I expect with installing packages.

Maybe it could be spelled out more thoroughly in the docs? There's just a bit more going on behind the scenes with buildGoPackage. For this one, I'm only interested in the bin/ directory and want to discard the rest of the output as there's nothing useful in there.

Also, fwiw, this is building on my mac but it did take a good long time for the compilation to finish, travis appears to be building a lot and it didn't finish.

Copy link
Member

Choose a reason for hiding this comment

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

We had a discussion about it here #16129 (comment)

Running a nix-build . -A jp.all or jp.bin got what I wanted but thats not the normal experience > I expect with installing packages.

You don' normally install packages by nix-build - it's meant to be used as development tool.
If you install a package with nix-env -i you don't need to specify package output.

@LnL7 LnL7 added the 8.has: package (new) This PR adds a new package label Jul 20, 2016
A json parson tool based on the JMESPATH query language.
http://jmespath.org/
@cransom
Copy link
Contributor Author

cransom commented Jul 21, 2016

Ahhh. I got it. I've pulled the override. #16129 (comment) explained it for me.

@LnL7 LnL7 merged commit 20a0be5 into NixOS:master Jul 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (new) This PR adds a new package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants