mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-07 13:33:12 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
57 lines
1.3 KiB
Nix
57 lines
1.3 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, pciutils
|
|
, pkg-config
|
|
, python3
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "x86info";
|
|
version = "unstable-2021-08-07";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "kernelslacker";
|
|
repo = pname;
|
|
rev = "061ea35ecb0697761b6260998fa2045b8bb0be68";
|
|
hash = "sha256-/qWioC4dV1bQkU4SiTR8duYqoGIMIH7s8vuAXi75juo=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
python3
|
|
];
|
|
|
|
buildInputs = [
|
|
pciutils
|
|
];
|
|
|
|
# causes redefinition of _FORTIFY_SOURCE
|
|
hardeningDisable = [ "fortify3" ];
|
|
|
|
postBuild = ''
|
|
patchShebangs lsmsr/createheader.py
|
|
make -C lsmsr
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp x86info $out/bin
|
|
cp lsmsr/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.gpl2Only;
|
|
homepage = "https://github.com/kernelslacker/x86info";
|
|
maintainers = with lib.maintainers; [ jcumming ];
|
|
};
|
|
}
|