nixos-riscv/pkgs/spec-cpu/specinvoke.nix

31 lines
602 B
Nix
Raw Normal View History

{
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;
}