sail-riscv-*: init at 0.5

This commit is contained in:
GenericNerdyUsername 2023-01-27 19:33:58 +00:00
parent fc50807657
commit 6f2d5c582b
No known key found for this signature in database
GPG key ID: 65BA194581245B15
2 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,55 @@
{ stdenv
, fetchFromGitHub
, lib
, arch
, ocamlPackages
, ocaml
, zlib
, z3
}:
stdenv.mkDerivation rec {
pname = "sail-riscv";
version = "0.5";
src = fetchFromGitHub {
owner = "riscv";
repo = pname;
rev = version;
hash = "sha256-7PZNNUMaCZEBf0lOCqkquewRgZPooBOjIbGF7JlLnEo=";
};
nativeBuildInputs = with ocamlPackages; [ ocamlbuild findlib ocaml z3 sail ];
buildInputs = with ocamlPackages; [ zlib linksem ];
strictDeps = true;
postPatch = ''
rm -r prover_snapshots
'';
makeFlags = [
"SAIL=sail"
"ARCH=${arch}"
"SAIL_DIR=${ocamlPackages.sail}/share/sail"
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp c_emulator/riscv_sim_${arch} $out/bin
mkdir $out/share/
cp -r generated_definitions/{coq,hol4,isabelle} $out/share/
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/riscv/sail-riscv";
description = "A formal specification of the RISC-V architecture, written in Sail";
maintainers = with maintainers; [ genericnerdyusername ];
license = licenses.bsd2;
};
}

View file

@ -38112,6 +38112,14 @@ with pkgs;
sailsd = callPackage ../misc/sailsd { }; sailsd = callPackage ../misc/sailsd { };
sail-riscv-rv32 = callPackage ../applications/virtualization/sail-riscv {
arch = "RV32";
};
sail-riscv-rv64 = callPackage ../applications/virtualization/sail-riscv {
arch = "RV64";
};
shc = callPackage ../tools/security/shc { }; shc = callPackage ../tools/security/shc { };
shellz = callPackage ../tools/security/shellz { }; shellz = callPackage ../tools/security/shellz { };