2016-10-12 12:20:57 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper, ncurses, ocamlPackages, graphviz
|
2018-12-02 13:14:31 +00:00
|
|
|
, ltl2ba, coq, why3, autoconf
|
2017-07-18 08:51:49 +01:00
|
|
|
}:
|
2012-07-12 16:42:24 +01:00
|
|
|
|
2016-10-12 12:20:57 +01:00
|
|
|
let
|
|
|
|
mkocamlpath = p: "${p}/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib";
|
|
|
|
ocamlpath = "${mkocamlpath ocamlPackages.apron}:${mkocamlpath ocamlPackages.mlgmpidl}";
|
|
|
|
in
|
|
|
|
|
frama-c: overhaul, upgrade to 20140301-Neon
This massively upgrades the frama-c package to be far more useful,
including support for a lot more plugins, including Jessie.
Jessie unfortunately requires that its plugin is installed alongside
frama-c, so we install why2 (where it lives) along with frama-c now.
This increases the size, but makes it much more useful.
In the future, it may be possible to split out the build such that why2
is a separate expression and frama-c only installs the plugin, rather
than all of why2. However, right now this is fine.
Furthermore, why3 is now a dependency - the Jessie plugin can use
either, and defaults to Why3 now. Per the design, Frama-C can also go
from Why2->Why3 as well.
We also make Coq and Alt-Ergo dependencies, so that out-of-the-box users
get at least one SMT solver and a prover for support.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-05-01 08:30:12 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "frama-c-${version}";
|
2018-12-02 13:14:31 +00:00
|
|
|
version = "18.0";
|
|
|
|
slang = "Argon";
|
2012-07-12 16:22:45 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-12-02 13:14:31 +00:00
|
|
|
url = "http://frama-c.com/download/frama-c-${version}-${slang}.tar.gz";
|
|
|
|
sha256 = "0a88k2mhafj7pz3dzgsqkrc9digkxpnvr9jqq9nbzwq8qr02bca2";
|
frama-c: overhaul, upgrade to 20140301-Neon
This massively upgrades the frama-c package to be far more useful,
including support for a lot more plugins, including Jessie.
Jessie unfortunately requires that its plugin is installed alongside
frama-c, so we install why2 (where it lives) along with frama-c now.
This increases the size, but makes it much more useful.
In the future, it may be possible to split out the build such that why2
is a separate expression and frama-c only installs the plugin, rather
than all of why2. However, right now this is fine.
Furthermore, why3 is now a dependency - the Jessie plugin can use
either, and defaults to Why3 now. Per the design, Frama-C can also go
from Why2->Why3 as well.
We also make Coq and Alt-Ergo dependencies, so that out-of-the-box users
get at least one SMT solver and a prover for support.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-05-01 08:30:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
why2 = fetchurl {
|
2018-08-22 22:13:48 +01:00
|
|
|
url = "http://why.lri.fr/download/why-2.40.tar.gz";
|
|
|
|
sha256 = "0h1mbpxsgwvf3pbl0qbg22j6f4v1ffka24ap1ajbjk9b1yb3ali8";
|
2012-07-12 16:22:45 +01:00
|
|
|
};
|
|
|
|
|
2017-07-18 08:51:49 +01:00
|
|
|
nativeBuildInputs = [ autoconf makeWrapper ];
|
2016-10-12 12:20:57 +01:00
|
|
|
|
2012-07-12 16:22:45 +01:00
|
|
|
buildInputs = with ocamlPackages; [
|
2018-12-02 13:14:31 +00:00
|
|
|
ncurses ocaml findlib ltl2ba ocamlgraph
|
|
|
|
lablgtk coq graphviz zarith why3 apron
|
2012-07-12 16:42:24 +01:00
|
|
|
];
|
|
|
|
|
2012-07-12 16:22:45 +01:00
|
|
|
|
2017-03-27 21:24:50 +01:00
|
|
|
# Experimentally, the build segfaults with high core counts
|
|
|
|
enableParallelBuilding = false;
|
frama-c: overhaul, upgrade to 20140301-Neon
This massively upgrades the frama-c package to be far more useful,
including support for a lot more plugins, including Jessie.
Jessie unfortunately requires that its plugin is installed alongside
frama-c, so we install why2 (where it lives) along with frama-c now.
This increases the size, but makes it much more useful.
In the future, it may be possible to split out the build such that why2
is a separate expression and frama-c only installs the plugin, rather
than all of why2. However, right now this is fine.
Furthermore, why3 is now a dependency - the Jessie plugin can use
either, and defaults to Why3 now. Per the design, Frama-C can also go
from Why2->Why3 as well.
We also make Coq and Alt-Ergo dependencies, so that out-of-the-box users
get at least one SMT solver and a prover for support.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-05-01 08:30:12 +01:00
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
tar xf $src
|
|
|
|
tar xf $why2
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
cd frama*
|
|
|
|
./configure --prefix=$out
|
2017-03-27 21:24:50 +01:00
|
|
|
# It is not parallel safe
|
|
|
|
make
|
frama-c: overhaul, upgrade to 20140301-Neon
This massively upgrades the frama-c package to be far more useful,
including support for a lot more plugins, including Jessie.
Jessie unfortunately requires that its plugin is installed alongside
frama-c, so we install why2 (where it lives) along with frama-c now.
This increases the size, but makes it much more useful.
In the future, it may be possible to split out the build such that why2
is a separate expression and frama-c only installs the plugin, rather
than all of why2. However, right now this is fine.
Furthermore, why3 is now a dependency - the Jessie plugin can use
either, and defaults to Why3 now. Per the design, Frama-C can also go
from Why2->Why3 as well.
We also make Coq and Alt-Ergo dependencies, so that out-of-the-box users
get at least one SMT solver and a prover for support.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-05-01 08:30:12 +01:00
|
|
|
make install
|
|
|
|
cd ../why*
|
|
|
|
FRAMAC=$out/bin/frama-c ./configure --prefix=$out
|
|
|
|
make
|
|
|
|
make install
|
2016-10-12 12:20:57 +01:00
|
|
|
for p in $out/bin/frama-c{,-gui};
|
|
|
|
do
|
|
|
|
wrapProgram $p --prefix OCAMLPATH ':' ${ocamlpath}
|
|
|
|
done
|
frama-c: overhaul, upgrade to 20140301-Neon
This massively upgrades the frama-c package to be far more useful,
including support for a lot more plugins, including Jessie.
Jessie unfortunately requires that its plugin is installed alongside
frama-c, so we install why2 (where it lives) along with frama-c now.
This increases the size, but makes it much more useful.
In the future, it may be possible to split out the build such that why2
is a separate expression and frama-c only installs the plugin, rather
than all of why2. However, right now this is fine.
Furthermore, why3 is now a dependency - the Jessie plugin can use
either, and defaults to Why3 now. Per the design, Frama-C can also go
from Why2->Why3 as well.
We also make Coq and Alt-Ergo dependencies, so that out-of-the-box users
get at least one SMT solver and a prover for support.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-05-01 08:30:12 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
# Enter frama-c directory before patching
|
|
|
|
prePatch = ''cd frama*'';
|
2016-10-12 12:20:57 +01:00
|
|
|
patches = [ ./dynamic.diff ];
|
2012-07-12 16:42:24 +01:00
|
|
|
postPatch = ''
|
|
|
|
# strip absolute paths to /usr/bin
|
2017-02-16 14:01:44 +00:00
|
|
|
for file in ./configure ./share/Makefile.common ./src/*/configure; do #*/
|
2012-07-12 16:42:24 +01:00
|
|
|
substituteInPlace $file --replace '/usr/bin/' ""
|
|
|
|
done
|
|
|
|
|
2016-09-27 21:26:10 +01:00
|
|
|
substituteInPlace ./src/plugins/aorai/aorai_register.ml --replace '"ltl2ba' '"${ltl2ba}/bin/ltl2ba'
|
frama-c: overhaul, upgrade to 20140301-Neon
This massively upgrades the frama-c package to be far more useful,
including support for a lot more plugins, including Jessie.
Jessie unfortunately requires that its plugin is installed alongside
frama-c, so we install why2 (where it lives) along with frama-c now.
This increases the size, but makes it much more useful.
In the future, it may be possible to split out the build such that why2
is a separate expression and frama-c only installs the plugin, rather
than all of why2. However, right now this is fine.
Furthermore, why3 is now a dependency - the Jessie plugin can use
either, and defaults to Why3 now. Per the design, Frama-C can also go
from Why2->Why3 as well.
We also make Coq and Alt-Ergo dependencies, so that out-of-the-box users
get at least one SMT solver and a prover for support.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-05-01 08:30:12 +01:00
|
|
|
|
|
|
|
cd ../why*
|
2017-02-16 14:01:44 +00:00
|
|
|
|
|
|
|
substituteInPlace ./Makefile.in --replace '-warn-error A' '-warn-error A-3'
|
frama-c: overhaul, upgrade to 20140301-Neon
This massively upgrades the frama-c package to be far more useful,
including support for a lot more plugins, including Jessie.
Jessie unfortunately requires that its plugin is installed alongside
frama-c, so we install why2 (where it lives) along with frama-c now.
This increases the size, but makes it much more useful.
In the future, it may be possible to split out the build such that why2
is a separate expression and frama-c only installs the plugin, rather
than all of why2. However, right now this is fine.
Furthermore, why3 is now a dependency - the Jessie plugin can use
either, and defaults to Why3 now. Per the design, Frama-C can also go
from Why2->Why3 as well.
We also make Coq and Alt-Ergo dependencies, so that out-of-the-box users
get at least one SMT solver and a prover for support.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-05-01 08:30:12 +01:00
|
|
|
substituteInPlace ./frama-c-plugin/Makefile --replace 'shell frama-c' "shell $out/bin/frama-c"
|
|
|
|
substituteInPlace ./jc/jc_make.ml --replace ' why-dp ' " $out/bin/why-dp "
|
|
|
|
substituteInPlace ./jc/jc_make.ml --replace "?= why@\n" "?= $out/bin/why@\n"
|
|
|
|
substituteInPlace ./jc/jc_make.ml --replace ' gwhy-bin@' " $out/bin/gwhy-bin@"
|
|
|
|
substituteInPlace ./jc/jc_make.ml --replace ' why3 ' " ${why3}/bin/why3 "
|
|
|
|
substituteInPlace ./jc/jc_make.ml --replace ' why3ide ' " ${why3}/bin/why3ide "
|
|
|
|
substituteInPlace ./jc/jc_make.ml --replace ' why3replayer ' " ${why3}/bin/why3replayer "
|
|
|
|
substituteInPlace ./jc/jc_make.ml --replace ' why3ml ' " ${why3}/bin/why3ml "
|
|
|
|
substituteInPlace ./jc/jc_make.ml --replace ' coqdep@' " ${coq}/bin/coqdep@"
|
|
|
|
substituteInPlace ./jc/jc_make.ml --replace 'coqc' " ${coq}/bin/coqc"
|
|
|
|
substituteInPlace ./frama-c-plugin/register.ml --replace ' jessie ' " $out/bin/jessie "
|
|
|
|
cd ..
|
2012-07-12 16:42:24 +01:00
|
|
|
'';
|
|
|
|
|
2012-07-12 16:22:45 +01:00
|
|
|
meta = {
|
2016-09-27 21:26:10 +01:00
|
|
|
description = "An extensible and collaborative platform dedicated to source-code analysis of C software";
|
frama-c: overhaul, upgrade to 20140301-Neon
This massively upgrades the frama-c package to be far more useful,
including support for a lot more plugins, including Jessie.
Jessie unfortunately requires that its plugin is installed alongside
frama-c, so we install why2 (where it lives) along with frama-c now.
This increases the size, but makes it much more useful.
In the future, it may be possible to split out the build such that why2
is a separate expression and frama-c only installs the plugin, rather
than all of why2. However, right now this is fine.
Furthermore, why3 is now a dependency - the Jessie plugin can use
either, and defaults to Why3 now. Per the design, Frama-C can also go
from Why2->Why3 as well.
We also make Coq and Alt-Ergo dependencies, so that out-of-the-box users
get at least one SMT solver and a prover for support.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-05-01 08:30:12 +01:00
|
|
|
homepage = http://frama-c.com/;
|
|
|
|
license = stdenv.lib.licenses.lgpl21;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ thoughtpolice amiddelk ];
|
2016-09-27 21:26:10 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2012-07-12 16:22:45 +01:00
|
|
|
};
|
|
|
|
}
|