diff options
author | David Guibert <david.guibert@gmail.com> | 2019-10-09 09:50:12 +0200 |
---|---|---|
committer | Jon <jonringer@users.noreply.github.com> | 2019-10-09 08:30:56 -0700 |
commit | 18b5ca29f5056bcfc280b76037a08c95a3e31f04 (patch) | |
tree | 9fc0fa9650344b07029aa28883985153227c9d23 /pkgs/tools | |
parent | 164c0a29eec9cf7e1be9fd216528cc0230bc258c (diff) |
inxi: enable json output
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.
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/system/inxi/default.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/tools/system/inxi/default.nix b/pkgs/tools/system/inxi/default.nix index 3c1e3e798623b..a896a57b08069 100644 --- a/pkgs/tools/system/inxi/default.nix +++ b/pkgs/tools/system/inxi/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, perl }: +{ stdenv, fetchFromGitHub, perl, perlPackages, makeWrapper }: stdenv.mkDerivation rec { pname = "inxi"; @@ -11,11 +11,13 @@ stdenv.mkDerivation rec { sha256 = "04134l323vwd0g2bffj11rnpw2jgs9la6aqrmv8vh7w9mq5nd57y"; }; - buildInputs = [ perl ]; + buildInputs = [ perl makeWrapper ]; installPhase = '' mkdir -p $out/bin cp inxi $out/bin/ + wrapProgram $out/bin/inxi \ + --set PERL5LIB "${perlPackages.makePerlPath (with perlPackages; [ CpanelJSONXS ])}" mkdir -p $out/share/man/man1 cp inxi.1 $out/share/man/man1/ ''; |