Merge pull request #168787 from rehno-lindeque/hw-probe-1.6.4
This commit is contained in:
commit
c59d30057b
|
@ -10948,6 +10948,12 @@
|
|||
githubId = 7226587;
|
||||
name = "Théophane Hufschmitt";
|
||||
};
|
||||
rehno-lindeque = {
|
||||
email = "rehno.lindeque+code@gmail.com";
|
||||
github = "rehno-lindeque";
|
||||
githubId = 337811;
|
||||
name = "Rehno Lindeque";
|
||||
};
|
||||
relrod = {
|
||||
email = "ricky@elrod.me";
|
||||
github = "relrod";
|
||||
|
|
140
pkgs/tools/system/hw-probe/default.nix
Normal file
140
pkgs/tools/system/hw-probe/default.nix
Normal file
|
@ -0,0 +1,140 @@
|
|||
{ config
|
||||
, stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, makeWrapper
|
||||
, makePerlPath
|
||||
|
||||
# Perl libraries
|
||||
, LWP
|
||||
, LWPProtocolHttps
|
||||
, HTTPMessage
|
||||
, HTTPDate
|
||||
, URI
|
||||
, TryTiny
|
||||
|
||||
# Required
|
||||
, coreutils
|
||||
, curl # Preferred to using the Perl HTTP libs - according to hw-probe.
|
||||
, dmidecode
|
||||
, edid-decode
|
||||
, gnugrep
|
||||
, gnutar
|
||||
, hwinfo
|
||||
, iproute2
|
||||
, kmod
|
||||
, pciutils
|
||||
, perl
|
||||
, smartmontools
|
||||
, usbutils
|
||||
, xz
|
||||
|
||||
# Conditionally recommended
|
||||
, systemdSupport ? stdenv.isLinux
|
||||
, systemd
|
||||
|
||||
# Recommended
|
||||
, withRecommended ? true # Install recommended tools
|
||||
, mcelog
|
||||
, hdparm
|
||||
, acpica-tools
|
||||
, drm_info
|
||||
, mesa-demos
|
||||
, memtester
|
||||
, sysstat
|
||||
, cpuid
|
||||
, util-linuxMinimal
|
||||
, xinput
|
||||
, libva-utils
|
||||
, inxi
|
||||
, vulkan-utils
|
||||
, i2c-tools
|
||||
, opensc
|
||||
|
||||
# Suggested
|
||||
, withSuggested ? false # Install (most) suggested tools
|
||||
, hplip
|
||||
, sane-backends
|
||||
# , pnputils # pnputils (lspnp) isn't currently in nixpkgs and appears to be poorly maintained
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "hw-probe";
|
||||
version = "1.6.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "linuxhw";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256:028wnhrbn10lfxwmcpzdbz67ygldimv7z1k1bm64ggclykvg5aim";
|
||||
};
|
||||
|
||||
makeFlags = [ "prefix=$(out)" ];
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
buildInputs = [ perl ];
|
||||
|
||||
makeWrapperArgs =
|
||||
let
|
||||
requiredPrograms = [
|
||||
hwinfo
|
||||
dmidecode
|
||||
smartmontools
|
||||
pciutils
|
||||
usbutils
|
||||
edid-decode
|
||||
iproute2 # (ip)
|
||||
coreutils # (sort)
|
||||
gnugrep
|
||||
curl
|
||||
gnutar
|
||||
xz
|
||||
kmod # (lsmod)
|
||||
];
|
||||
recommendedPrograms = [
|
||||
mcelog
|
||||
hdparm
|
||||
acpica-tools
|
||||
drm_info
|
||||
mesa-demos
|
||||
memtester
|
||||
sysstat # (iostat)
|
||||
cpuid
|
||||
util-linuxMinimal # (rfkill)
|
||||
xinput
|
||||
libva-utils # (vainfo)
|
||||
inxi
|
||||
vulkan-utils
|
||||
i2c-tools
|
||||
opensc
|
||||
];
|
||||
conditionallyRecommendedPrograms = lib.optional systemdSupport systemd; # (systemd-analyze)
|
||||
suggestedPrograms = [
|
||||
hplip # (hp-probe)
|
||||
sane-backends # (sane-find-scanner)
|
||||
# pnputils # (lspnp)
|
||||
];
|
||||
programs =
|
||||
requiredPrograms
|
||||
++ conditionallyRecommendedPrograms
|
||||
++ lib.optionals withRecommended recommendedPrograms
|
||||
++ lib.optionals withSuggested suggestedPrograms;
|
||||
in [
|
||||
"--set" "PERL5LIB" "${makePerlPath [ LWP LWPProtocolHttps HTTPMessage URI HTTPDate TryTiny ]}"
|
||||
"--prefix" "PATH" ":" "${lib.makeBinPath programs}"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/hw-probe \
|
||||
$makeWrapperArgs
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Probe for hardware, check operability and find drivers";
|
||||
homepage = "https://github.com/linuxhw/hw-probe";
|
||||
platforms = with platforms; (linux ++ freebsd ++ netbsd ++ openbsd);
|
||||
license = with licenses; [ lgpl21 bsdOriginal ];
|
||||
maintainers = with maintainers; [ rehno-lindeque ];
|
||||
};
|
||||
}
|
|
@ -7462,6 +7462,8 @@ with pkgs;
|
|||
|
||||
hwinfo = callPackage ../tools/system/hwinfo { };
|
||||
|
||||
hw-probe = perlPackages.callPackage ../tools/system/hw-probe { };
|
||||
|
||||
hybridreverb2 = callPackage ../applications/audio/hybridreverb2 {
|
||||
stdenv = gcc8Stdenv;
|
||||
};
|
||||
|
@ -21872,6 +21874,7 @@ with pkgs;
|
|||
inherit (darwin.apple_sdk.frameworks) AppKit Cocoa;
|
||||
};
|
||||
vulkan-tools-lunarg = callPackage ../tools/graphics/vulkan-tools-lunarg { };
|
||||
vulkan-utils = haskell.lib.compose.justStaticExecutables haskellPackages.vulkan-utils;
|
||||
vulkan-validation-layers = callPackage ../development/tools/vulkan-validation-layers { };
|
||||
|
||||
vxl = callPackage ../development/libraries/vxl { };
|
||||
|
|
Loading…
Reference in a new issue