Skip to content

Commit

Permalink
Merge pull request NixOS#8491 from vbgl/compcert-2.5
Browse files Browse the repository at this point in the history
compcert: 2.4 -> 2.5
  • Loading branch information
vbgl committed Aug 26, 2015
2 parents 1e18b75 + 475527a commit 70f2952
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
24 changes: 19 additions & 5 deletions pkgs/development/compilers/compcert/default.nix
Original file line number Diff line number Diff line change
@@ -1,23 +1,37 @@
{ stdenv, fetchurl, coq, ocaml, ocamlPackages }:
{ stdenv, fetchurl, coq, ocamlPackages
, tools ? stdenv.cc
}:

stdenv.mkDerivation rec {
name = "compcert-${version}";
version = "2.4";
version = "2.5";

src = fetchurl {
url = "http://compcert.inria.fr/release/${name}.tgz";
sha256 = "1qrb1cplx3v5wxn1c46kx67v1j52yznvjm2hkrsdybphhki2pyia";
sha256 = "15gxarl2a8mz33fdn8pycj0ccazgmllbg2940n7aqdjlz807p11n";
};

buildInputs = [ coq ocaml ocamlPackages.menhir ];
buildInputs = [ coq ] ++ (with ocamlPackages; [ ocaml menhir ]);

enableParallelBuilding = true;

configurePhase = ''
substituteInPlace ./configure --replace '{toolprefix}gcc' '{toolprefix}cc'
./configure -prefix $out -toolprefix ${stdenv.cc}/bin/ '' +
./configure -prefix $out -toolprefix ${tools}/bin/ '' +
(if stdenv.isDarwin then "ia32-macosx" else "ia32-linux");

installTargets = "documentation install";

postInstall = ''
mkdir -p $lib/share/doc/compcert
mv doc/html $lib/share/doc/compcert/
mkdir -p $lib/lib/coq/${coq.coq-version}/user-contrib/compcert/
mv backend cfrontend common cparser driver flocq ia32 lib \
$lib/lib/coq/${coq.coq-version}/user-contrib/compcert/
'';

outputs = [ "out" "lib" ];

meta = with stdenv.lib; {
description = "Formally verified C compiler";
homepage = "http://compcert.inria.fr";
Expand Down
6 changes: 5 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3738,7 +3738,11 @@ let

cmucl_binary = callPackage ../development/compilers/cmucl/binary.nix { };

compcert = callPackage ../development/compilers/compcert {};
compcert = callPackage ../development/compilers/compcert (
if system == "x86_64-linux"
then { tools = pkgsi686Linux.stdenv.cc; }
else {}
);

cryptol = haskellPackages.cryptol;

Expand Down

0 comments on commit 70f2952

Please sign in to comment.