sail-riscv-rv32,sail-riscv-rv64: fix build on x86_64-darwin
This commit is contained in:
parent
2f0a70084d
commit
07c7ec4d1a
|
@ -1,5 +1,6 @@
|
||||||
{ stdenv
|
{ stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
, lib
|
, lib
|
||||||
, arch
|
, arch
|
||||||
, ocamlPackages
|
, ocamlPackages
|
||||||
|
@ -24,14 +25,24 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = with ocamlPackages; [ zlib linksem ];
|
buildInputs = with ocamlPackages; [ zlib linksem ];
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/riscv/sail-riscv/pull/250/commits/8bd37c484b83a8ce89c8bb7a001b8ae34dc4d77f.patch";
|
||||||
|
hash = "sha256-tDgkGhcbT6phoCAvilxMI56YUuUqQFgvh+2QduOjdMg=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
rm -r prover_snapshots
|
rm -r prover_snapshots
|
||||||
|
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
|
substituteInPlace Makefile --replace "-flto" ""
|
||||||
'';
|
'';
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"SAIL=sail"
|
"SAIL=sail"
|
||||||
"ARCH=${arch}"
|
"ARCH=${arch}"
|
||||||
"SAIL_DIR=${ocamlPackages.sail}/share/sail"
|
"SAIL_DIR=${ocamlPackages.sail}/share/sail"
|
||||||
|
"LEM_DIR=${ocamlPackages.sail}/share/lem"
|
||||||
];
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
@ -50,6 +61,7 @@ stdenv.mkDerivation rec {
|
||||||
homepage = "https://github.com/riscv/sail-riscv";
|
homepage = "https://github.com/riscv/sail-riscv";
|
||||||
description = "A formal specification of the RISC-V architecture, written in Sail";
|
description = "A formal specification of the RISC-V architecture, written in Sail";
|
||||||
maintainers = with maintainers; [ genericnerdyusername ];
|
maintainers = with maintainers; [ genericnerdyusername ];
|
||||||
|
broken = stdenv.isDarwin && stdenv.isAarch64;
|
||||||
license = licenses.bsd2;
|
license = licenses.bsd2;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue