base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / x8 / x86info / package.nix
blob86830c851e55de85894bd0bcaa2e7a3b4f92c43e
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , pciutils
5 , pkg-config
6 , python3
7 }:
9 stdenv.mkDerivation rec {
10   pname = "x86info";
11   version = "unstable-2021-08-07";
13   src = fetchFromGitHub {
14     owner = "kernelslacker";
15     repo = pname;
16     rev = "061ea35ecb0697761b6260998fa2045b8bb0be68";
17     hash = "sha256-/qWioC4dV1bQkU4SiTR8duYqoGIMIH7s8vuAXi75juo=";
18   };
20   nativeBuildInputs = [
21     pkg-config
22     python3
23   ];
25   buildInputs = [
26     pciutils
27   ];
29   # causes redefinition of _FORTIFY_SOURCE
30   hardeningDisable = [ "fortify3" ];
32   postBuild = ''
33     patchShebangs lsmsr/createheader.py
34     make -C lsmsr
35   '';
37   installPhase = ''
38     mkdir -p $out/bin
39     cp x86info $out/bin
40     cp lsmsr/lsmsr $out/bin
41   '';
43   meta = {
44     description = "Identification utility for the x86 series of processors";
45     longDescription = ''
46       x86info will identify all Intel/AMD/Centaur/Cyrix/VIA CPUs. It leverages
47       the cpuid kernel module where possible.  it supports parsing model specific
48       registers (MSRs) via the msr kernel module.  it will approximate processor
49       frequency, and identify the cache sizes and layout.
50     '';
51     platforms = [ "i686-linux" "x86_64-linux" ];
52     license = lib.licenses.gpl2Only;
53     homepage = "https://github.com/kernelslacker/x86info";
54     maintainers = with lib.maintainers; [ jcumming ];
55   };