mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 14:11:36 +00:00
28b6fb61e6
This is done for the sake of Yosemite, which does not have gcc, and yet this change is also compatible with Linux.
30 lines
909 B
Nix
30 lines
909 B
Nix
{ stdenv, fetchurl, coq, ocaml, ocamlPackages }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "compcert-${version}";
|
|
version = "2.4";
|
|
|
|
src = fetchurl {
|
|
url = "http://compcert.inria.fr/release/${name}.tgz";
|
|
sha256 = "1qrb1cplx3v5wxn1c46kx67v1j52yznvjm2hkrsdybphhki2pyia";
|
|
};
|
|
|
|
buildInputs = [ coq ocaml ocamlPackages.menhir ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
configurePhase = ''
|
|
substituteInPlace ./configure --replace '{toolprefix}gcc' '{toolprefix}cc'
|
|
./configure -prefix $out -toolprefix ${stdenv.cc}/bin/ '' +
|
|
(if stdenv.isDarwin then "ia32-macosx" else "ia32-linux");
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Formally verified C compiler";
|
|
homepage = "http://compcert.inria.fr";
|
|
license = licenses.inria;
|
|
platforms = platforms.linux ++
|
|
platforms.darwin;
|
|
maintainers = with maintainers; [ thoughtpolice jwiegley vbgl ];
|
|
};
|
|
}
|