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 09:30:12 +02:00
|
|
|
{ stdenv, fetchurl, ncurses, ocamlPackages, graphviz
|
2014-11-07 10:50:39 +01:00
|
|
|
, ltl2ba, coq, alt-ergo, why3 }:
|
2012-07-12 17:42:24 +02:00
|
|
|
|
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 09:30:12 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "frama-c-${version}";
|
2015-04-27 15:26:41 +02:00
|
|
|
version = "20150201";
|
|
|
|
slang = "Sodium";
|
2012-07-12 17:22:45 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
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 09:30:12 +02:00
|
|
|
url = "http://frama-c.com/download/frama-c-${slang}-${version}.tar.gz";
|
2015-06-12 15:28:34 +02:00
|
|
|
sha256 = "0zask160vj8bxgc07dzxj5hqbdp6gz5g00j6za5397961imxhxaq";
|
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 09:30:12 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
why2 = fetchurl {
|
|
|
|
url = "http://why.lri.fr/download/why-2.34.tar.gz";
|
|
|
|
sha256 = "1335bhq9v3h46m8aba2c5myi9ghm87q41in0m15xvdrwq5big1jg";
|
2012-07-12 17:22:45 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = with ocamlPackages; [
|
2014-11-07 10:50:39 +01:00
|
|
|
ncurses ocaml findlib alt-ergo ltl2ba ocamlgraph
|
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 09:30:12 +02:00
|
|
|
lablgtk coq graphviz zarith why3 zarith
|
2012-07-12 17:42:24 +02:00
|
|
|
];
|
|
|
|
|
2012-07-12 17:22:45 +02:00
|
|
|
|
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 09:30:12 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
tar xf $src
|
|
|
|
tar xf $why2
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
cd frama*
|
|
|
|
./configure --prefix=$out
|
|
|
|
make -j$NIX_BUILD_CORES
|
|
|
|
make install
|
|
|
|
cd ../why*
|
|
|
|
FRAMAC=$out/bin/frama-c ./configure --prefix=$out
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
|
|
# Enter frama-c directory before patching
|
|
|
|
prePatch = ''cd frama*'';
|
2012-07-12 17:42:24 +02:00
|
|
|
postPatch = ''
|
|
|
|
# strip absolute paths to /usr/bin
|
|
|
|
for file in ./configure ./share/Makefile.common ./src/*/configure; do
|
|
|
|
substituteInPlace $file --replace '/usr/bin/' ""
|
|
|
|
done
|
|
|
|
|
|
|
|
# find library paths
|
|
|
|
OCAMLGRAPH_HOME=`ocamlfind query ocamlgraph`
|
|
|
|
LABLGTK_HOME=`ocamlfind query lablgtk2`
|
|
|
|
|
|
|
|
# patch search paths
|
|
|
|
# ensure that the tests against the ocamlgraph version succeeds
|
|
|
|
# filter out the additional search paths from ocamldep
|
|
|
|
substituteInPlace ./configure \
|
|
|
|
--replace '$OCAMLLIB/ocamlgraph' "$OCAMLGRAPH_HOME" \
|
|
|
|
--replace '$OCAMLLIB/lablgtk2' "$LABLGTK_HOME" \
|
|
|
|
--replace '+ocamlgraph' "$OCAMLGRAPH_HOME" \
|
|
|
|
substituteInPlace ./Makefile --replace '+lablgtk2' "$LABLGTK_HOME" \
|
|
|
|
--replace '$(patsubst +%,.,$(INCLUDES) $(GUI_INCLUDES))' \
|
|
|
|
'$(patsubst /%,.,$(patsubst +%,.,$(INCLUDES) $(GUI_INCLUDES)))'
|
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 09:30:12 +02:00
|
|
|
|
|
|
|
substituteInPlace ./src/aorai/aorai_register.ml --replace '"ltl2ba' '"${ltl2ba}/bin/ltl2ba'
|
|
|
|
|
|
|
|
cd ../why*
|
|
|
|
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 17:42:24 +02:00
|
|
|
'';
|
|
|
|
|
2012-07-12 17:22:45 +02:00
|
|
|
meta = {
|
|
|
|
description = "Frama-C is an extensible tool for 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 09:30:12 +02:00
|
|
|
homepage = http://frama-c.com/;
|
|
|
|
license = stdenv.lib.licenses.lgpl21;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ thoughtpolice amiddelk ];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2012-07-12 17:22:45 +02:00
|
|
|
};
|
|
|
|
}
|