1 { lib, stdenv, fetchFromGitea, perl, perlPackages, makeWrapper
2 , ps, dnsutils # dig is recommended for multiple categories
3 , withRecommends ? false # Install (almost) all recommended tools (see --recommends)
4 , withRecommendedSystemPrograms ? withRecommends, util-linuxMinimal, dmidecode
5 , file, hddtemp, iproute2, ipmitool, usbutils, kmod, lm_sensors, smartmontools
6 , binutils, tree, upower, pciutils
7 , withRecommendedDisplayInformationPrograms ? withRecommends, mesa-demos, xorg
11 prefixPath = programs:
12 "--prefix PATH ':' '${lib.makeBinPath programs}'";
13 recommendedSystemPrograms = lib.optionals withRecommendedSystemPrograms [
14 util-linuxMinimal dmidecode file hddtemp iproute2 ipmitool usbutils kmod
15 lm_sensors smartmontools binutils tree upower pciutils
17 recommendedDisplayInformationPrograms = lib.optionals
18 withRecommendedDisplayInformationPrograms
19 ([ mesa-demos ] ++ (with xorg; [ xdpyinfo xprop xrandr ]));
20 programs = [ ps dnsutils ] # Core programs
21 ++ recommendedSystemPrograms
22 ++ recommendedDisplayInformationPrograms;
23 in stdenv.mkDerivation rec {
27 src = fetchFromGitea {
28 domain = "codeberg.org";
32 hash = "sha256-wWG/fs+tZIiFI+dcqfwXeh9RxT2zJDiAZoizhAAu60Q=";
35 nativeBuildInputs = [ makeWrapper ];
36 buildInputs = [ perl ];
41 wrapProgram $out/bin/inxi \
42 --set PERL5LIB "${perlPackages.makePerlPath (with perlPackages; [ CpanelJSONXS ])}" \
43 ${prefixPath programs}
44 mkdir -p $out/share/man/man1
45 cp inxi.1 $out/share/man/man1/
49 description = "Full featured CLI system information tool";
51 inxi is a command line system information script built for console and
52 IRC. It is also used a debugging tool for forum technical support to
53 quickly ascertain users' system configurations and hardware. inxi shows
54 system hardware, CPU, drivers, Xorg, Desktop, Kernel, gcc version(s),
55 Processes, RAM usage, and a wide variety of other useful information.
57 homepage = "https://smxi.org/docs/inxi.htm";
58 changelog = "https://github.com/smxi/inxi/blob/${version}/inxi.changelog";
59 license = licenses.gpl3Plus;
60 platforms = platforms.unix;