spike: fix build

This commit is contained in:
Lancelot SIX 2021-03-12 00:11:46 +00:00 committed by tomberek
parent bc1069bcbd
commit 44c21068ae

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchgit, dtc, nixosTests }:
{ lib, stdenv, fetchgit, dtc, nixosTests, fetchpatch }:
stdenv.mkDerivation rec {
pname = "spike";
@ -13,7 +13,15 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ dtc ];
enableParallelBuilding = true;
patchPhase = ''
patches = [
# Add missing headers to fix build.
(fetchpatch {
url = "https://github.com/riscv/riscv-isa-sim/commit/b3855682c2d744c613d2ffd6b53e3f021ecea4f3.patch";
sha256 = "1v1mpp4iddf5n4h3kmj65g075m7xc31bxww7gldnmgl607ma7cnl";
})
];
postPatch = ''
patchShebangs scripts/*.sh
patchShebangs tests/ebreak.py
'';