2024-10-08 10:13:27 +02:00
|
|
|
{
|
|
|
|
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/";
|
2024-10-08 16:31:07 +02:00
|
|
|
patches = [
|
|
|
|
./specinvoke-execve.patch
|
|
|
|
];
|
2024-10-08 10:13:27 +02:00
|
|
|
# Almost no bugs
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
'';
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
hardeningDisable = [ "all" ];
|
|
|
|
dontStrip = true;
|
|
|
|
}
|