spike: init at 1.0.0
Spike is the RISC-V ISA simulator from the RISC-V project.
This commit is contained in:
parent
312b238674
commit
e750461511
|
@ -0,0 +1,22 @@
|
||||||
|
import ./make-test-python.nix ({ pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
riscvPkgs = import ../.. { crossSystem = pkgs.stdenv.lib.systems.examples.riscv64-embedded; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
name = "spike";
|
||||||
|
meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ blitz ]; };
|
||||||
|
|
||||||
|
machine = { pkgs, lib, ... }: {
|
||||||
|
environment.systemPackages = [ pkgs.spike riscvPkgs.riscv-pk riscvPkgs.hello ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Run the RISC-V hello applications using the proxy kernel on the
|
||||||
|
# Spike emulator and see whether we get the expected output.
|
||||||
|
testScript =
|
||||||
|
''
|
||||||
|
machine.wait_for_unit("multi-user.target")
|
||||||
|
output = machine.succeed("spike -m64 $(which pk) $(which hello)")
|
||||||
|
assert output == "Hello, world!\n"
|
||||||
|
'';
|
||||||
|
})
|
|
@ -0,0 +1,30 @@
|
||||||
|
{ stdenv, fetchgit, dtc }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "spike";
|
||||||
|
version = "1.0.0";
|
||||||
|
|
||||||
|
src = fetchgit {
|
||||||
|
url = "https://github.com/riscv/riscv-isa-sim.git";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "1hcl01nj96s3rkz4mrq747s5lkw81lgdjdimb8b1b9h8qnida7ww";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ dtc ];
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
patchPhase = ''
|
||||||
|
patchShebangs scripts/*.sh
|
||||||
|
patchShebangs tests/ebreak.py
|
||||||
|
'';
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "A RISC-V ISA Simulator";
|
||||||
|
homepage = "https://github.com/riscv/riscv-isa-sim";
|
||||||
|
license = licenses.bsd3;
|
||||||
|
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
|
maintainers = with maintainers; [ blitz ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -20942,6 +20942,8 @@ in
|
||||||
|
|
||||||
spice-vdagent = callPackage ../applications/virtualization/spice-vdagent { };
|
spice-vdagent = callPackage ../applications/virtualization/spice-vdagent { };
|
||||||
|
|
||||||
|
spike = callPackage ../applications/virtualization/spike { };
|
||||||
|
|
||||||
spideroak = callPackage ../applications/networking/spideroak { };
|
spideroak = callPackage ../applications/networking/spideroak { };
|
||||||
|
|
||||||
split2flac = callPackage ../applications/audio/split2flac { };
|
split2flac = callPackage ../applications/audio/split2flac { };
|
||||||
|
|
Loading…
Reference in New Issue