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.
56 lines
1.4 KiB
Nix
56 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
perl,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "cpuid";
|
|
version = "20241023";
|
|
|
|
src = fetchurl {
|
|
url = "http://etallen.com/cpuid/${pname}-${version}.src.tar.gz";
|
|
sha256 = "sha256-/HdDWo1dKzVRcTMB6M24PmKjz+3IQTKw7JsbteUkT9w=";
|
|
};
|
|
|
|
# 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 = with lib; {
|
|
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.
|
|
'';
|
|
homepage = "http://etallen.com/cpuid.html";
|
|
license = licenses.gpl2Plus;
|
|
maintainers = with maintainers; [ blitz ];
|
|
platforms = [
|
|
"i686-linux"
|
|
"x86_64-linux"
|
|
];
|
|
};
|
|
}
|