compcert: 3.7 → 3.8
This commit is contained in:
parent
23290bd131
commit
a35e7daa2b
|
@ -1,36 +1,52 @@
|
||||||
{ stdenv, lib, fetchFromGitHub, fetchpatch, makeWrapper
|
{ stdenv, fetchFromGitHub, fetchpatch, makeWrapper
|
||||||
, coq, ocamlPackages, coq2html
|
, coqPackages, ocamlPackages, coq2html
|
||||||
, tools ? stdenv.cc
|
, tools ? stdenv.cc
|
||||||
|
, version ? "3.8"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
ocaml-pkgs = with ocamlPackages; [ ocaml findlib menhir ];
|
ocaml-pkgs = with ocamlPackages; [ ocaml findlib menhir ];
|
||||||
ccomp-platform = if stdenv.isDarwin then "x86_64-macosx" else "x86_64-linux";
|
ccomp-platform = if stdenv.isDarwin then "x86_64-macosx" else "x86_64-linux";
|
||||||
|
inherit (coqPackages) coq flocq;
|
||||||
|
inherit (stdenv.lib) optional optionalString;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
let param = {
|
||||||
|
"3.7" = {
|
||||||
|
sha256 = "1h4zhk9rrqki193nxs9vjvya7nl9yxjcf07hfqb6g77riy1vd2jr";
|
||||||
|
patches = [
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/AbsInt/CompCert/commit/0a2db0269809539ccc66f8ec73637c37fbd23580.patch";
|
||||||
|
sha256 = "0n8qrba70x8f422jdvq9ddgsx6avf2dkg892g4ldh3jiiidyhspy";
|
||||||
|
})
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/AbsInt/CompCert/commit/5e29f8b5ba9582ecf2a1d0baeaef195873640607.patch";
|
||||||
|
sha256 = "184nfdgxrkci880lkaj5pgnify3plka7xfgqrgv16275sqppc5hc";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
"3.8" = {
|
||||||
|
sha256 = "1gzlyxvw64ca12qql3wnq3bidcx9ygsklv9grjma3ib4hvg7vnr7";
|
||||||
|
useExternalFlocq = true;
|
||||||
|
};
|
||||||
|
}."${version}"; in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "compcert";
|
pname = "compcert";
|
||||||
version = "3.7";
|
inherit version;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "AbsInt";
|
owner = "AbsInt";
|
||||||
repo = "CompCert";
|
repo = "CompCert";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1h4zhk9rrqki193nxs9vjvya7nl9yxjcf07hfqb6g77riy1vd2jr";
|
inherit (param) sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = param.patches or [];
|
||||||
(fetchpatch {
|
|
||||||
url = "https://github.com/AbsInt/CompCert/commit/0a2db0269809539ccc66f8ec73637c37fbd23580.patch";
|
|
||||||
sha256 = "0n8qrba70x8f422jdvq9ddgsx6avf2dkg892g4ldh3jiiidyhspy";
|
|
||||||
})
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://github.com/AbsInt/CompCert/commit/5e29f8b5ba9582ecf2a1d0baeaef195873640607.patch";
|
|
||||||
sha256 = "184nfdgxrkci880lkaj5pgnify3plka7xfgqrgv16275sqppc5hc";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
buildInputs = ocaml-pkgs ++ [ coq coq2html ];
|
buildInputs = ocaml-pkgs ++ [ coq coq2html ];
|
||||||
|
propagatedBuildInputs = optional (param.useExternalFlocq or false) flocq;
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
@ -43,6 +59,7 @@ stdenv.mkDerivation rec {
|
||||||
-prefix $out \
|
-prefix $out \
|
||||||
-coqdevdir $lib/lib/coq/${coq.coq-version}/user-contrib/compcert/ \
|
-coqdevdir $lib/lib/coq/${coq.coq-version}/user-contrib/compcert/ \
|
||||||
-toolprefix ${tools}/bin/ \
|
-toolprefix ${tools}/bin/ \
|
||||||
|
${optionalString (param.useExternalFlocq or false) "-use-external-Flocq"} \
|
||||||
${ccomp-platform}
|
${ccomp-platform}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -68,7 +85,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Formally verified C compiler";
|
description = "Formally verified C compiler";
|
||||||
homepage = "http://compcert.inria.fr";
|
homepage = "https://compcert.org";
|
||||||
license = licenses.inria-compcert;
|
license = licenses.inria-compcert;
|
||||||
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
||||||
maintainers = with maintainers; [ thoughtpolice jwiegley vbgl ];
|
maintainers = with maintainers; [ thoughtpolice jwiegley vbgl ];
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
{ lib, callPackage, newScope, recurseIntoAttrs, ocamlPackages_4_05, ocamlPackages_4_09 }:
|
{ lib, callPackage, newScope, recurseIntoAttrs, ocamlPackages_4_05, ocamlPackages_4_09
|
||||||
|
, compcert
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
mkCoqPackages' = self: coq:
|
mkCoqPackages' = self: coq:
|
||||||
|
@ -59,7 +61,9 @@ let
|
||||||
tlc = callPackage ../development/coq-modules/tlc {};
|
tlc = callPackage ../development/coq-modules/tlc {};
|
||||||
Velisarios = callPackage ../development/coq-modules/Velisarios {};
|
Velisarios = callPackage ../development/coq-modules/Velisarios {};
|
||||||
Verdi = callPackage ../development/coq-modules/Verdi {};
|
Verdi = callPackage ../development/coq-modules/Verdi {};
|
||||||
VST = callPackage ../development/coq-modules/VST {};
|
VST = callPackage ../development/coq-modules/VST {
|
||||||
|
compcert = compcert.override { version = "3.7"; };
|
||||||
|
};
|
||||||
|
|
||||||
filterPackages = filterCoqPackages;
|
filterPackages = filterCoqPackages;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue