diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
commit | 62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch) | |
tree | c2630f69080637987b68acb1ee8676d2681fe304 /pkgs/os-specific/linux/cpuid | |
parent | d9c82ed3044c72cecf01c6ea042489d30914577c (diff) | |
parent | e24069138dfec3ef94f211f1da005bb5395adc11 (diff) | |
download | nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2 nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip |
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/os-specific/linux/cpuid')
-rw-r--r-- | pkgs/os-specific/linux/cpuid/default.nix | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/cpuid/default.nix b/pkgs/os-specific/linux/cpuid/default.nix new file mode 100644 index 00000000000..ea9ae06130e --- /dev/null +++ b/pkgs/os-specific/linux/cpuid/default.nix @@ -0,0 +1,50 @@ +{ lib, stdenv, fetchurl, perl }: + +stdenv.mkDerivation rec { + pname = "cpuid"; + version = "20201006"; + + src = fetchurl { + name = "${pname}-${version}.src.tar.gz"; + url = "http://etallen.com/cpuid/${pname}-${version}.src.tar.gz"; + sha256 = "19jnkh57f979b78ak5mpxmdvnkgc33r55cw9shgd2hc380b3zi8k"; + }; + + # For pod2man during the build process. + nativeBuildInputs = [ perl ]; + + # As runtime dependency for cpuinfo2cpuid. + buildInputs = [ perl ]; + + # The Makefile hardcodes $(BUILDROOT)/usr as installation + # destination. Just nuke all mentions of /usr to get the right + # installation location. + patchPhase = '' + sed -i -e 's,/usr/,/,' Makefile + ''; + + installPhase = '' + make install BUILDROOT=$out + + if [ ! -x $out/bin/cpuid ]; then + echo Failed to properly patch Makefile. + exit 1 + fi + ''; + + meta = { + description = "Linux tool to dump x86 CPUID information about the CPU"; + longDescription = '' + cpuid dumps detailed information about the CPU(s) gathered from the CPUID + instruction, and also determines the exact model of CPU(s). It supports + Intel, AMD, VIA, Hygon, and Zhaoxin CPUs, as well as older Transmeta, + Cyrix, UMC, NexGen, Rise, and SiS CPUs. + ''; + + platforms = [ "i686-linux" "x86_64-linux" ]; + license = lib.licenses.gpl2; + homepage = "http://etallen.com/cpuid.html"; + maintainers = with lib.maintainers; [ blitz ]; + }; + +} |