commit
ce52d6b6ae
@ -944,6 +944,12 @@
|
|||||||
githubId = 5718007;
|
githubId = 5718007;
|
||||||
name = "Bastian Köcher";
|
name = "Bastian Köcher";
|
||||||
};
|
};
|
||||||
|
blitz = {
|
||||||
|
email = "js@alien8.de";
|
||||||
|
github = "blitz";
|
||||||
|
githubId = 37907;
|
||||||
|
name = "Julian Stecklina";
|
||||||
|
};
|
||||||
bluescreen303 = {
|
bluescreen303 = {
|
||||||
email = "mathijs@bluescreen303.nl";
|
email = "mathijs@bluescreen303.nl";
|
||||||
github = "bluescreen303";
|
github = "bluescreen303";
|
||||||
|
22
nixos/tests/spike.nix
Normal file
22
nixos/tests/spike.nix
Normal file
@ -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"
|
||||||
|
'';
|
||||||
|
})
|
30
pkgs/applications/virtualization/spike/default.nix
Normal file
30
pkgs/applications/virtualization/spike/default.nix
Normal file
@ -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 ];
|
||||||
|
};
|
||||||
|
}
|
@ -21016,6 +21016,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
Block a user