17 buildDunePackage rec {
21 src = fetchFromGitHub {
22 owner = "rems-project";
25 hash = "sha256-HY/rgWi0S7ZiAWZF0fVIRK6fpoJ7Xp5EQcxoPRCPJ5Y=";
28 minimalOCamlVersion = "4.08";
37 propagatedBuildInputs = [
48 rm -r aarch* # Remove code derived from non-bsd2 arm spec
49 rm -r snapshots # Some of this might be derived from stuff in the aarch dir, it builds fine without it
51 # `buildDunePackage` only builds the [pname] package
52 # This doesnt work in this case, as sail includes multiple packages in the same source tree
55 dune build --release ''${enableParallelBuilding:+-j $NIX_BUILD_CORES}
60 dune runtest ''${enableParallelBuilding:+-j $NIX_BUILD_CORES}
65 dune install --prefix $out --libdir $OCAMLFIND_DESTDIR
69 wrapProgram $out/bin/sail --set SAIL_DIR $out/share/sail
73 homepage = "https://github.com/rems-project/sail";
74 description = "Language for describing the instruction-set architecture (ISA) semantics of processors";
75 maintainers = with maintainers; [ genericnerdyusername ];
76 license = licenses.bsd2;