Build specinvoke from source
The one contained in the CPU SPEC ISO is built for x86, and there is no binary for RISC-V.
This commit is contained in:
parent
a9e149a125
commit
ce70726bf6
@ -14,6 +14,7 @@ final: prev:
|
||||
spec-cpu-tools = final.callPackage ./pkgs/spec-cpu/tools.nix { };
|
||||
spec-cpu = final.callPackage ./pkgs/spec-cpu/default.nix { };
|
||||
spec-cpu-mini = final.callPackage ./pkgs/spec-cpu/mini.nix { };
|
||||
specinvoke = final.callPackage ./pkgs/spec-cpu/specinvoke.nix { };
|
||||
spec-cpu-clang = final.callPackage ./pkgs/spec-cpu/default.nix { stdenv = final.stdenvClangEpi; };
|
||||
|
||||
blis = ((prev.blis.override {
|
||||
|
@ -2,6 +2,7 @@
|
||||
stdenv
|
||||
, spec-cpu
|
||||
, spec-cpu-tools
|
||||
, specinvoke
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -49,9 +50,8 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p $out/bin
|
||||
echo -e "#!$SHELL\necho $out" > $out/bin/spec-cpu-mini
|
||||
chmod +x $out/bin/spec-cpu-mini
|
||||
cp $(command -v specinvoke) $out/bin
|
||||
cp ${specinvoke}/bin/specinvoke $out/bin
|
||||
'';
|
||||
nativeBuildInputs = [ spec-cpu-tools ];
|
||||
enableParallelBuilding = false;
|
||||
hardeningDisable = [ "all" ];
|
||||
dontStrip = true;
|
||||
|
30
pkgs/spec-cpu/specinvoke.nix
Normal file
30
pkgs/spec-cpu/specinvoke.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user