summary refs log tree commit diff
diff options
context:
space:
mode:
authorArie Middelkoop <amiddelk@gmail.com>2012-07-12 17:22:45 +0200
committerArie Middelkoop <amiddelk@gmail.com>2012-07-31 14:08:48 +0200
commit7d708365805ad7f9056c05611de9c24f357ca4d2 (patch)
tree700cf471f9f93a1203af8a91dd1db4882eaef68b
parentb5d4e8a17a70657455122d6103d156ef6c2f6d07 (diff)
downloadnixlib-7d708365805ad7f9056c05611de9c24f357ca4d2.tar
nixlib-7d708365805ad7f9056c05611de9c24f357ca4d2.tar.gz
nixlib-7d708365805ad7f9056c05611de9c24f357ca4d2.tar.bz2
nixlib-7d708365805ad7f9056c05611de9c24f357ca4d2.tar.lz
nixlib-7d708365805ad7f9056c05611de9c24f357ca4d2.tar.xz
nixlib-7d708365805ad7f9056c05611de9c24f357ca4d2.tar.zst
nixlib-7d708365805ad7f9056c05611de9c24f357ca4d2.zip
ocamlgraph: update to 1.8.2
Also added the dependency on lablgtk, so that it builds the 'dgraph' module,
which is needed for packaging frama-c. This dependency can be made optional.
-rw-r--r--pkgs/development/ocaml-modules/ocamlgraph/default.nix14
-rw-r--r--pkgs/development/tools/misc/frama-c/default.nix29
2 files changed, 39 insertions, 4 deletions
diff --git a/pkgs/development/ocaml-modules/ocamlgraph/default.nix b/pkgs/development/ocaml-modules/ocamlgraph/default.nix
index 92a465731174..2e109f1d6210 100644
--- a/pkgs/development/ocaml-modules/ocamlgraph/default.nix
+++ b/pkgs/development/ocaml-modules/ocamlgraph/default.nix
@@ -1,8 +1,8 @@
-{stdenv, fetchurl, ocaml, findlib }:
+{stdenv, fetchurl, ocaml, findlib, ocamlPackages }:
 
 let
   ocaml_version = (builtins.parseDrvName ocaml.name).version;
-  version = "1.8.1";
+  version = "1.8.2";
 in
 
 stdenv.mkDerivation {
@@ -10,15 +10,21 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "http://ocamlgraph.lri.fr/download/ocamlgraph-${version}.tar.gz";
-    sha256 = "0hrba69wvw9b42irkvjf6q7zzw12v5nyyc33yaq3jlf1qbzqhqxs";
+    sha256 = "e54ae60cd977a032854166dad56348d0fb76c6cd8e03e960af455268f0c8b5a6";
   };
 
-  buildInputs = [ ocaml findlib ];
+  buildInputs = [ ocaml findlib ocamlPackages.lablgtk ];
 
   patches = ./destdir.patch;
 
+  # some patching is required so that the lablgtk2 library is taken into account. It
+  # does not reside in a subdirectory of the default library path, hence:
+  # * configure looked in the wrong path
+  # * ocaml needs that directory and the stubs directory as -I flag
   postPatch = ''
     sed -i 's@$(DESTDIR)$(OCAMLLIB)/ocamlgraph@$(DESTDIR)/lib/ocaml/${ocaml_version}/site-lib/ocamlgraph@' Makefile.in
+    sed -i 's@$OCAMLLIB/lablgtk2@${ocamlPackages.lablgtk}/lib/ocaml/${ocaml_version}/site-lib/lablgtk2@' configure Makefile.in
+    sed -i 's@-I +lablgtk2@-I ${ocamlPackages.lablgtk}/lib/ocaml/${ocaml_version}/site-lib/lablgtk2 -I ${ocamlPackages.lablgtk}/lib/ocaml/${ocaml_version}/site-lib/stublibs@' configure Makefile.in editor/Makefile
   '';
 
   createFindlibDestdir = true;
diff --git a/pkgs/development/tools/misc/frama-c/default.nix b/pkgs/development/tools/misc/frama-c/default.nix
new file mode 100644
index 000000000000..2f597d29c75b
--- /dev/null
+++ b/pkgs/development/tools/misc/frama-c/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, ocamlPackages }:
+
+let
+
+  version = "20111001";
+  sha256 = "8afad848321c958fab265045cd152482e77ce7c175ee7c9af2d4bec57a1bc671";
+
+in stdenv.mkDerivation {
+  name = "frama-c-${version}";
+
+  src = fetchurl {
+    url = "http://frama-c.com/download/frama-c-Nitrogen-${version}.tar.gz";
+    inherit sha256;
+  };
+
+  buildInputs = with ocamlPackages; [
+    ocaml findlib
+  ];
+
+  meta = {
+    description = "Frama-C is an extensible tool for source-code analysis of C software";
+
+    homepage = http://frama-c.com/;
+    license = "GPLv2";
+
+    maintainers = [ stdenv.lib.maintainers.amiddelk ];
+    platforms = stdenv.lib.platforms.gnu;
+  };
+}