nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 104 lines 2.6 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromCodeberg, 5 perl, 6 perlPackages, 7 makeWrapper, 8 ps, 9 dnsutils, # dig is recommended for multiple categories 10 withRecommends ? false, # Install (almost) all recommended tools (see --recommends) 11 withRecommendedSystemPrograms ? withRecommends, 12 util-linuxMinimal, 13 dmidecode, 14 file, 15 hddtemp, 16 iproute2, 17 ipmitool, 18 usbutils, 19 kmod, 20 lm_sensors, 21 smartmontools, 22 binutils, 23 tree, 24 upower, 25 pciutils, 26 withRecommendedDisplayInformationPrograms ? withRecommends, 27 mesa-demos, 28 xrandr, 29 xprop, 30 xdpyinfo, 31}: 32 33let 34 prefixPath = programs: "--prefix PATH ':' '${lib.makeBinPath programs}'"; 35 recommendedSystemPrograms = lib.optionals withRecommendedSystemPrograms [ 36 util-linuxMinimal 37 dmidecode 38 file 39 hddtemp 40 iproute2 41 ipmitool 42 usbutils 43 kmod 44 lm_sensors 45 smartmontools 46 binutils 47 tree 48 upower 49 pciutils 50 ]; 51 recommendedDisplayInformationPrograms = lib.optionals withRecommendedDisplayInformationPrograms [ 52 mesa-demos 53 xdpyinfo 54 xprop 55 xrandr 56 ]; 57 programs = [ 58 ps 59 dnsutils 60 ] # Core programs 61 ++ recommendedSystemPrograms 62 ++ recommendedDisplayInformationPrograms; 63in 64stdenv.mkDerivation (finalAttrs: { 65 pname = "inxi"; 66 version = "3.3.39-1"; 67 68 src = fetchFromCodeberg { 69 owner = "smxi"; 70 repo = "inxi"; 71 tag = finalAttrs.version; 72 hash = "sha256-IfwklyXMOuluQ6L96n7k31RHItE7GmmjExrPAGBjbUQ="; 73 }; 74 75 nativeBuildInputs = [ makeWrapper ]; 76 buildInputs = [ perl ]; 77 78 installPhase = '' 79 mkdir -p $out/bin 80 cp inxi $out/bin/ 81 wrapProgram $out/bin/inxi \ 82 --set PERL5LIB "${perlPackages.makePerlPath (with perlPackages; [ CpanelJSONXS ])}" \ 83 ${prefixPath programs} 84 mkdir -p $out/share/man/man1 85 cp inxi.1 $out/share/man/man1/ 86 ''; 87 88 meta = { 89 description = "Full featured CLI system information tool"; 90 longDescription = '' 91 inxi is a command line system information script built for console and 92 IRC. It is also used a debugging tool for forum technical support to 93 quickly ascertain users' system configurations and hardware. inxi shows 94 system hardware, CPU, drivers, Xorg, Desktop, Kernel, gcc version(s), 95 Processes, RAM usage, and a wide variety of other useful information. 96 ''; 97 homepage = "https://smxi.org/docs/inxi.htm"; 98 changelog = "https://codeberg.org/smxi/inxi/src/tag/${finalAttrs.version}/inxi.changelog"; 99 license = lib.licenses.gpl3Plus; 100 platforms = lib.platforms.unix; 101 maintainers = [ ]; 102 mainProgram = "inxi"; 103 }; 104})