2019-06-18 19:01:38 -07:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper, writeText
|
|
|
|
, autoconf, ncurses, graphviz, doxygen
|
|
|
|
, ocamlPackages, ltl2ba, coq, why3,
|
2017-07-18 00:51:49 -07:00
|
|
|
}:
|
2012-07-12 08:42:24 -07:00
|
|
|
|
2016-10-12 04:20:57 -07:00
|
|
|
let
|
|
|
|
mkocamlpath = p: "${p}/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib";
|
2019-06-18 19:01:38 -07:00
|
|
|
runtimeDeps = with ocamlPackages; [
|
|
|
|
apron
|
|
|
|
biniou
|
|
|
|
camlzip
|
|
|
|
easy-format
|
|
|
|
menhir
|
|
|
|
mlgmpidl
|
|
|
|
num
|
|
|
|
ocamlgraph
|
|
|
|
why3
|
|
|
|
yojson
|
|
|
|
zarith
|
|
|
|
];
|
|
|
|
ocamlpath = lib.concatMapStringsSep ":" mkocamlpath runtimeDeps;
|
2016-10-12 04:20:57 -07:00
|
|
|
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 00:30:12 -07:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "frama-c-${version}";
|
2019-06-18 19:01:38 -07:00
|
|
|
version = "19.0";
|
|
|
|
slang = "Potassium";
|
2012-07-12 08:22:45 -07:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-12-02 05:14:31 -08:00
|
|
|
url = "http://frama-c.com/download/frama-c-${version}-${slang}.tar.gz";
|
2019-06-18 19:01:38 -07:00
|
|
|
sha256 = "190n1n4k0xbycz25bn0d2gnfxd8w6scz3nlixl7w2k2jvpqlcs3n";
|
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 00:30:12 -07:00
|
|
|
|
2012-07-12 08:22:45 -07:00
|
|
|
};
|
|
|
|
|
2019-06-18 19:01:38 -07:00
|
|
|
preConfigure = lib.optionalString stdenv.cc.isClang "configureFlagsArray=(\"--with-cpp=clang -E -C\")";
|
|
|
|
|
2017-07-18 00:51:49 -07:00
|
|
|
nativeBuildInputs = [ autoconf makeWrapper ];
|
2016-10-12 04:20:57 -07:00
|
|
|
|
2012-07-12 08:22:45 -07:00
|
|
|
buildInputs = with ocamlPackages; [
|
2019-06-18 19:01:38 -07:00
|
|
|
ncurses ocaml findlib ltl2ba ocamlgraph yojson menhir camlzip
|
|
|
|
lablgtk coq graphviz zarith apron why3 mlgmpidl doxygen
|
2012-07-12 08:42:24 -07:00
|
|
|
];
|
|
|
|
|
2019-06-18 19:01:38 -07:00
|
|
|
enableParallelBuilding = true;
|
2012-07-12 08:22:45 -07:00
|
|
|
|
2019-06-18 19:01:38 -07:00
|
|
|
fixupPhase = ''
|
2016-10-12 04:20:57 -07: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 00:30:12 -07:00
|
|
|
'';
|
|
|
|
|
2019-06-18 19:01:38 -07:00
|
|
|
# Allow loading of external Frama-C plugins
|
|
|
|
setupHook = writeText "setupHook.sh" ''
|
|
|
|
addFramaCPath () {
|
|
|
|
if test -d "''$1/lib/frama-c/plugins"; then
|
|
|
|
export FRAMAC_PLUGIN="''${FRAMAC_PLUGIN}''${FRAMAC_PLUGIN:+:}''$1/lib/frama-c/plugins"
|
|
|
|
export OCAMLPATH="''${OCAMLPATH}''${OCAMLPATH:+:}''$1/lib/frama-c/plugins"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -d "''$1/lib/frama-c"; then
|
|
|
|
export OCAMLPATH="''${OCAMLPATH}''${OCAMLPATH:+:}''$1/lib/frama-c"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -d "''$1/share/frama-c/"; then
|
|
|
|
export FRAMAC_EXTRA_SHARE="''${FRAMAC_EXTRA_SHARE}''${FRAMAC_EXTRA_SHARE:+:}''$1/share/frama-c"
|
|
|
|
fi
|
2012-07-12 08:42:24 -07:00
|
|
|
|
2019-06-18 19:01:38 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
addEnvHooks "$targetOffset" addFramaCPath
|
2012-07-12 08:42:24 -07:00
|
|
|
'';
|
|
|
|
|
2019-06-18 19:01:38 -07:00
|
|
|
|
2012-07-12 08:22:45 -07:00
|
|
|
meta = {
|
2016-09-27 13:26:10 -07: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 00:30:12 -07:00
|
|
|
homepage = http://frama-c.com/;
|
|
|
|
license = stdenv.lib.licenses.lgpl21;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ thoughtpolice amiddelk ];
|
2016-09-27 13:26:10 -07:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2012-07-12 08:22:45 -07:00
|
|
|
};
|
|
|
|
}
|