about summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-03-27 11:42:47 +0200
committerGitHub <noreply@github.com>2022-03-27 11:42:47 +0200
commit27caba1c2efecc62a047a733f8fa3dc327ea574d (patch)
tree623abc2b1dc11336d4a0db515d7819267fd1ecc0 /pkgs/os-specific
parentced99c024882bb1b3dfc313ee5aa5d7e04e672a2 (diff)
parent58b569fa72a14ad43e693db42823005c07055e9f (diff)
downloadnixlib-27caba1c2efecc62a047a733f8fa3dc327ea574d.tar
nixlib-27caba1c2efecc62a047a733f8fa3dc327ea574d.tar.gz
nixlib-27caba1c2efecc62a047a733f8fa3dc327ea574d.tar.bz2
nixlib-27caba1c2efecc62a047a733f8fa3dc327ea574d.tar.lz
nixlib-27caba1c2efecc62a047a733f8fa3dc327ea574d.tar.xz
nixlib-27caba1c2efecc62a047a733f8fa3dc327ea574d.tar.zst
nixlib-27caba1c2efecc62a047a733f8fa3dc327ea574d.zip
Merge pull request #165163 from armeenm/bump-x86info
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/x86info/default.nix45
1 files changed, 29 insertions, 16 deletions
diff --git a/pkgs/os-specific/linux/x86info/default.nix b/pkgs/os-specific/linux/x86info/default.nix
index e842b59651e7..db5b040da3a2 100644
--- a/pkgs/os-specific/linux/x86info/default.nix
+++ b/pkgs/os-specific/linux/x86info/default.nix
@@ -1,32 +1,45 @@
-{lib, stdenv, fetchurl, pciutils, python2}:
+{ lib
+, stdenv
+, fetchFromGitHub
+, pciutils
+, pkg-config
+, python3
+}:
 
 stdenv.mkDerivation rec {
-  version = "1.30";
   pname = "x86info";
+  version = "unstable-2021-08-07";
 
-  src = fetchurl {
-    url = "http://codemonkey.org.uk/projects/x86info/${pname}-${version}.tgz";
-    sha256 = "0a4lzka46nabpsrg3n7akwr46q38f96zfszd73xcback1s2hjc7y";
+  src = fetchFromGitHub {
+    owner = "kernelslacker";
+    repo = pname;
+    rev = "061ea35ecb0697761b6260998fa2045b8bb0be68";
+    hash = "sha256-/qWioC4dV1bQkU4SiTR8duYqoGIMIH7s8vuAXi75juo=";
   };
 
-  preConfigure = ''
-    patchShebangs .
+  nativeBuildInputs = [
+    pkg-config
+    python3
+  ];
 
-    # ignore warnings
-    sed -i 's/-Werror -Wall//' Makefile
-  '';
+  buildInputs = [
+    pciutils
+  ];
 
-  buildInputs = [ pciutils python2 ];
+  postBuild = ''
+    patchShebangs lsmsr/createheader.py
+    make -C lsmsr
+  '';
 
   installPhase = ''
     mkdir -p $out/bin
-    cp x86info lsmsr $out/bin
+    cp x86info $out/bin
+    cp lsmsr/lsmsr $out/bin
   '';
 
   meta = {
     description = "Identification utility for the x86 series of processors";
-    longDescription =
-    ''
+    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
@@ -34,7 +47,7 @@ stdenv.mkDerivation rec {
     '';
     platforms = [ "i686-linux" "x86_64-linux" ];
     license = lib.licenses.gpl2;
-    homepage = "http://codemonkey.org.uk/projects/x86info/";
-    maintainers = with lib.maintainers; [jcumming];
+    homepage = "https://github.com/kernelslacker/x86info";
+    maintainers = with lib.maintainers; [ jcumming ];
   };
 }