nixos-riscv/pkgs/spec-cpu/specinvoke.nix
Rodrigo Arias Mallo ce70726bf6 Build specinvoke from source
The one contained in the CPU SPEC ISO is built for x86, and there is no
binary for RISC-V.
2024-10-08 10:13:27 +02:00

31 lines
602 B
Nix

{
stdenv
, libarchive
, spec-cpu-tools
, runCommandNoCC
}:
let
version = spec-cpu-tools.version;
tar = runCommandNoCC "specinvoke-${version}.tar" {
src = spec-cpu-tools.src;
nativeBuildInputs = [ libarchive ];
} ''
mkdir iso
bsdtar -C iso -xf $src
cp iso/install_archives/tools-src.tar $out
'';
in stdenv.mkDerivation {
pname = "specinvoke";
version = version;
src = tar;
sourceRoot = "tools/src/specinvoke/";
# Almost no bugs
preInstall = ''
mkdir -p $out/bin
'';
enableParallelBuilding = false;
hardeningDisable = [ "all" ];
dontStrip = true;
}