mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-19 17:39:34 +00:00
inxi: Add a flag to install all recommended tools
This commit is contained in:
parent
06a34e69ad
commit
18504037c5
|
@ -1,6 +1,26 @@
|
||||||
{ stdenv, fetchFromGitHub, perl, perlPackages, makeWrapper }:
|
{ lib, stdenv, fetchFromGitHub, perl, perlPackages, makeWrapper
|
||||||
|
, ps, dnsutils # dig is recommended for multiple categories
|
||||||
|
, withRecommends ? false # Install (almost) all recommended tools (see --recommends)
|
||||||
|
, withRecommendedSystemPrograms ? withRecommends, utillinuxMinimal, dmidecode
|
||||||
|
, file, hddtemp, iproute, ipmitool, usbutils, kmod, lm_sensors, smartmontools
|
||||||
|
, binutils, tree, upower
|
||||||
|
, withRecommendedDisplayInformationPrograms ? withRecommends, glxinfo, xorg
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
|
prefixPath = programs:
|
||||||
|
"--prefix PATH ':' '${stdenv.lib.makeBinPath programs}'";
|
||||||
|
recommendedSystemPrograms = lib.optionals withRecommendedSystemPrograms [
|
||||||
|
utillinuxMinimal dmidecode file hddtemp iproute ipmitool usbutils kmod
|
||||||
|
lm_sensors smartmontools binutils tree upower
|
||||||
|
];
|
||||||
|
recommendedDisplayInformationPrograms = lib.optionals
|
||||||
|
withRecommendedDisplayInformationPrograms
|
||||||
|
([ glxinfo ] ++ (with xorg; [ xdpyinfo xprop xrandr ]));
|
||||||
|
programs = [ ps dnsutils ] # Core programs
|
||||||
|
++ recommendedSystemPrograms
|
||||||
|
++ recommendedDisplayInformationPrograms;
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
pname = "inxi";
|
pname = "inxi";
|
||||||
version = "3.1.00-1";
|
version = "3.1.00-1";
|
||||||
|
|
||||||
|
@ -17,7 +37,8 @@ stdenv.mkDerivation rec {
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp inxi $out/bin/
|
cp inxi $out/bin/
|
||||||
wrapProgram $out/bin/inxi \
|
wrapProgram $out/bin/inxi \
|
||||||
--set PERL5LIB "${perlPackages.makePerlPath (with perlPackages; [ CpanelJSONXS ])}"
|
--set PERL5LIB "${perlPackages.makePerlPath (with perlPackages; [ CpanelJSONXS ])}" \
|
||||||
|
${prefixPath programs}
|
||||||
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…
Reference in a new issue