summary refs log tree commit diff
path: root/pkgs/os-specific/linux/x86info/default.nix
blob: dbda35670f66100fe75a0c1164540445409e4f3c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{lib, stdenv, fetchurl, pciutils, python}:

stdenv.mkDerivation rec {
  version = "1.30";
  pname = "x86info";

  src = fetchurl {
    url = "http://codemonkey.org.uk/projects/x86info/${pname}-${version}.tgz";
    sha256 = "0a4lzka46nabpsrg3n7akwr46q38f96zfszd73xcback1s2hjc7y";
  };

  preConfigure = ''
    patchShebangs .

    # ignore warnings
    sed -i 's/-Werror -Wall//' Makefile
  '';

  buildInputs = [ pciutils python ];

  installPhase = ''
    mkdir -p $out/bin
    cp x86info lsmsr $out/bin
  '';

  meta = {
    description = "Identification utility for the x86 series of processors";
    longDescription =
    ''
      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
      frequency, and identify the cache sizes and layout.
    '';
    platforms = [ "i686-linux" "x86_64-linux" ];
    license = lib.licenses.gpl2;
    homepage = "http://codemonkey.org.uk/projects/x86info/";
    maintainers = with lib.maintainers; [jcumming];
  };
}