git.iko.soy/typeable/nixpkgs
on master help sign in
cpuid: init at 20200427

cpuid is a tool to describe x86 CPU features. This is useful for people doing low-level software development.

commit5fa0612d85736b759dbe9b2fc1db0cc420a59233 authorJulian Stecklina <julian.stecklina@cyberus-technology.de> dateThu 17 Sep 2020, 18:47 (6 years ago) parent68c436b
2 files changed+52
pkgs/os-specific/linux/cpuid/default.nix+50 pkgs/top-level/all-packages.nix+2
pkgs/os-specific/linux/cpuid/default.nixnew file+50
@@ -0,0 +1,50 @@
1+{ stdenv, fetchurl, perl }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "cpuid";
5+ version = "20200427";
6+
7+ src = fetchurl {
8+ name = "${pname}-${version}.src.tar.gz";
9+ url = "http://etallen.com/cpuid/${pname}-${version}.src.tar.gz";
10+ sha256 = "1m31238z2ya8f8pzpyklwp0ksf5xicqrw1z941hhhx913wzldaf1";
11+ };
12+
13+ # For pod2man during the build process.
14+ nativeBuildInputs = [ perl ];
15+
16+ # As runtime dependency for cpuinfo2cpuid.
17+ buildInputs = [ perl ];
18+
19+ # The Makefile hardcodes $(BUILDROOT)/usr as installation
20+ # destination. Just nuke all mentions of /usr to get the right
21+ # installation location.
22+ patchPhase = ''
23+ sed -i -e 's,/usr/,/,' Makefile
24+ '';
25+
26+ installPhase = ''
27+ make install BUILDROOT=$out
28+
29+ if [ ! -x $out/bin/cpuid ]; then
30+ echo Failed to properly patch Makefile.
31+ exit 1
32+ fi
33+ '';
34+
35+ meta = {
36+ description = "Linux tool to dump x86 CPUID information about the CPU";
37+ longDescription = ''
38+ cpuid dumps detailed information about the CPU(s) gathered from the CPUID
39+ instruction, and also determines the exact model of CPU(s). It supports
40+ Intel, AMD, VIA, Hygon, and Zhaoxin CPUs, as well as older Transmeta,
41+ Cyrix, UMC, NexGen, Rise, and SiS CPUs.
42+ '';
43+
44+ platforms = [ "i686-linux" "x86_64-linux" ];
45+ license = stdenv.lib.licenses.gpl2;
46+ homepage = "http://etallen.com/cpuid.html";
47+ maintainers = with stdenv.lib.maintainers; [ blitz ];
48+ };
49+
50+}
pkgs/top-level/all-packages.nix+2
@@ -962,6 +962,8 @@ in
962962
963963 cozy = callPackage ../applications/audio/cozy-audiobooks { };
964964
965+ cpuid = callPackage ../os-specific/linux/cpuid { };
966+
965967 ctrtool = callPackage ../tools/archivers/ctrtool { };
966968
967969 crowbar = callPackage ../tools/security/crowbar { };