2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pciutils
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "x86info";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "unstable-2021-08-07";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kernelslacker";
|
|
|
|
repo = pname;
|
|
|
|
rev = "061ea35ecb0697761b6260998fa2045b8bb0be68";
|
|
|
|
hash = "sha256-/qWioC4dV1bQkU4SiTR8duYqoGIMIH7s8vuAXi75juo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
python3
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
buildInputs = [
|
|
|
|
pciutils
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
postBuild = ''
|
|
|
|
patchShebangs lsmsr/createheader.py
|
|
|
|
make -C lsmsr
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2022-03-30 09:31:56 +00:00
|
|
|
cp x86info $out/bin
|
|
|
|
cp lsmsr/lsmsr $out/bin
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Identification utility for the x86 series of processors";
|
2022-03-30 09:31:56 +00:00
|
|
|
longDescription = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
x86info will identify all Intel/AMD/Centaur/Cyrix/VIA CPUs. It leverages
|
|
|
|
the cpuid kernel module where possible. it supports parsing model specific
|
|
|
|
registers (MSRs) via the msr kernel module. it will approximate processor
|
2021-02-05 17:12:51 +00:00
|
|
|
frequency, and identify the cache sizes and layout.
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.gpl2;
|
2022-03-30 09:31:56 +00:00
|
|
|
homepage = "https://github.com/kernelslacker/x86info";
|
|
|
|
maintainers = with lib.maintainers; [ jcumming ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|