Prune spec-cpu-mini

This commit is contained in:
2024-10-07 14:50:36 +02:00
parent bc3e8513db
commit c2fcd40bc1
2 changed files with 26 additions and 4 deletions

View File

@@ -26,12 +26,25 @@ stdenv.mkDerivation rec {
];
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p $out/benchspec/CPU
buildPhase = ''
pwd
mkdir -p benchspec/CPU
for bench in $benchList; do
cp -a ${spec-cpu}/benchspec/CPU/$bench $out/benchspec/CPU/
cp -r ${spec-cpu}/benchspec/CPU/$bench benchspec/CPU/
done
# Make writable
chmod -R +w benchspec
# Remove environment
find benchspec -name '*.cmd' | xargs sed -i '/^-E/d'
# Remove compare script as it refers to spec-cpu-tools
find benchspec -name 'compare.cmd' -delete
'';
installPhase = ''
pwd
mkdir -p $out
cp -r benchspec/ $out
mkdir -p $out/bin
echo -e "#!$SHELL\necho $out" > $out/bin/spec-cpu-mini
chmod +x $out/bin/spec-cpu-mini