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

inxi: enable json output #70836

Merged
merged 1 commit into from Oct 9, 2019
Merged

inxi: enable json output #70836

merged 1 commit into from Oct 9, 2019

Conversation

dguibert
Copy link
Member

@dguibert dguibert commented Oct 9, 2019

Before this patch:
$ inxi --output json --output-file output.json $additional_args
Error 80: The required json Perl module is not installed:
Cpanel::JSON::XS OR JSON::XS
See --recommends for more information.

With this patch, it works as expected:
$ inxi --output json --output-file output.json $additional_args
Writing JSON data to: output.json
Data written successfully.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

Before this patch:
$ inxi --output json --output-file output.json $additional_args
Error 80: The required json Perl module is not installed:
Cpanel::JSON::XS OR JSON::XS
See --recommends for more information.

With this patch, it works as expected:
$ inxi --output json --output-file output.json $additional_args
Writing JSON data to: output.json
Data written successfully.
@primeos
Copy link
Member

primeos commented Oct 9, 2019

@dguibert thanks for your PR! :) Are you ok with my minor change?

Only one of both packets is required (OR) and inxi --recommends states the following:

For json export Cpanel::JSON::XS is preferred over JSON::XS.

I also removed $out/${perlPackages.perl.libPrefix} as it currently doesn't exist, but of course it doesn't really hurt either.

(Edit: And just to note it here: I kept with perlPackages in case we'll add more packages later but it isn't required anymore.)

@ofborg ofborg bot requested a review from primeos October 9, 2019 14:42
@dguibert
Copy link
Member Author

dguibert commented Oct 9, 2019

@dguibert thanks for your PR! :) Are you ok with my minor change?

Yes, much cleaner.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

nix-review passes on NixOS
diff LGTM
executable seems to work

[2 built, 2 copied (1.2 MiB), 0.3 MiB DL]
https://github.com/NixOS/nixpkgs/pull/70836
1 package were build:
inxi

@jonringer
Copy link
Contributor

@GrahamcOfBorg build inxi

@jonringer jonringer merged commit 18b5ca2 into NixOS:master Oct 9, 2019
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

3 participants