13 stdenv.mkDerivation rec {
17 src = fetchFromGitHub {
21 hash = "sha256-7PZNNUMaCZEBf0lOCqkquewRgZPooBOjIbGF7JlLnEo=";
24 nativeBuildInputs = with ocamlPackages; [ ocamlbuild findlib ocaml z3 sail ];
25 buildInputs = with ocamlPackages; [ zlib linksem ];
30 url = "https://github.com/riscv/sail-riscv/pull/250/commits/8bd37c484b83a8ce89c8bb7a001b8ae34dc4d77f.patch";
31 hash = "sha256-tDgkGhcbT6phoCAvilxMI56YUuUqQFgvh+2QduOjdMg=";
36 rm -r prover_snapshots
37 '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
38 substituteInPlace Makefile --replace "-flto" ""
44 "SAIL_DIR=${ocamlPackages.sail}/share/sail"
45 "LEM_DIR=${ocamlPackages.sail}/share/lem"
52 cp c_emulator/riscv_sim_${arch} $out/bin
54 cp -r generated_definitions/{coq,hol4,isabelle} $out/share/
61 homepage = "https://github.com/riscv/sail-riscv";
62 description = "A formal specification of the RISC-V architecture, written in Sail";
63 maintainers = with maintainers; [ genericnerdyusername ];
64 broken = stdenv.isDarwin && stdenv.isAarch64;
65 license = licenses.bsd2;