forked from rarias/nixos-riscv
Prune spec-cpu-mini
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user