sail-riscv-*: init at 0.5
This commit is contained in:
parent
fc50807657
commit
6f2d5c582b
2 changed files with 63 additions and 0 deletions
55
pkgs/applications/virtualization/sail-riscv/default.nix
Normal file
55
pkgs/applications/virtualization/sail-riscv/default.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
|
@ -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 { };
|
||||||
|
|
Loading…
Reference in a new issue