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.
This commit is contained in:
parent
164c0a29ee
commit
18b5ca29f5
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchFromGitHub, perl }:
|
{ stdenv, fetchFromGitHub, perl, perlPackages, makeWrapper }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "inxi";
|
pname = "inxi";
|
||||||
@ -11,11 +11,13 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "04134l323vwd0g2bffj11rnpw2jgs9la6aqrmv8vh7w9mq5nd57y";
|
sha256 = "04134l323vwd0g2bffj11rnpw2jgs9la6aqrmv8vh7w9mq5nd57y";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ perl ];
|
buildInputs = [ perl makeWrapper ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp inxi $out/bin/
|
cp inxi $out/bin/
|
||||||
|
wrapProgram $out/bin/inxi \
|
||||||
|
--set PERL5LIB "${perlPackages.makePerlPath (with perlPackages; [ CpanelJSONXS ])}"
|
||||||
mkdir -p $out/share/man/man1
|
mkdir -p $out/share/man/man1
|
||||||
cp inxi.1 $out/share/man/man1/
|
cp inxi.1 $out/share/man/man1/
|
||||||
'';
|
'';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user