Updated the coccinelle package to the latest release (1.0.0-RC9).

Added additional ocaml modules which are needed for coccinelle.

svn path=/nixpkgs/trunk/; revision=31579
wip/yesman
Arie Middelkoop 13 years ago
parent 3b833cc93b
commit c87285c255
  1. 23
      pkgs/development/ocaml-modules/extlib/default.nix
  2. 20
      pkgs/development/ocaml-modules/ocamlmake/default.nix
  3. 9
      pkgs/development/ocaml-modules/pcre/default.nix
  4. 51
      pkgs/development/ocaml-modules/pycaml/default.nix
  5. 26
      pkgs/development/ocaml-modules/sexplib/default.nix
  6. 25
      pkgs/development/ocaml-modules/typeconv/default.nix
  7. 20
      pkgs/development/tools/misc/coccinelle/default.nix
  8. 15
      pkgs/top-level/all-packages.nix

@ -0,0 +1,23 @@
{stdenv, fetchurl, ocaml, findlib}:
stdenv.mkDerivation {
name = "ocaml-extlib-1.5.2";
src = fetchurl {
url = "http://ocaml-extlib.googlecode.com/files/extlib-1.5.2.tar.gz";
sha256 = "ca6d69adeba4242ce41c02a23746ba1e464c0bbec66e2d16b02c3c6e85dc10aa";
};
buildInputs = [ocaml findlib];
createFindlibDestdir = true;
configurePhase = "true";
meta = {
homepage = "http://code.google.com/p/ocaml-extlib/";
description = "Enhancements to the OCaml Standard Library modules";
license = "LGPL";
platforms = ocaml.meta.platforms;
};
}

@ -0,0 +1,20 @@
{stdenv, fetchurl}:
stdenv.mkDerivation {
name = "ocaml-make-6.33.0";
src = fetchurl {
url = "http://www.ocaml.info/ocaml_sources/ocaml-make-6.33.0.tar.gz";
sha256 = "3054303ba04e4bbbe038e08310fabc3e5a0e3899bbba33d9ac5ed7a1b9d1e05a";
};
phases = [ "unpackPhase" "installPhase" ];
installPhase = "cp OCamlMakefile $out";
meta = {
homepage = "http://www.ocaml.info/home/ocaml_sources.html";
description = "Generic OCaml Makefile for GNU Make";
license = "LGPL";
};
}

@ -2,16 +2,15 @@
let
ocaml_version = (builtins.parseDrvName ocaml.name).version;
version = "6.1.0";
version = "6.2.5";
in
stdenv.mkDerivation {
name = "ocaml-pcre-${version}";
src = fetchurl {
url = "http://hg.ocaml.info/release/pcre-ocaml/archive/" +
"release-${version}.tar.bz2";
sha256 = "1lj9mzabi1crxwvb2ly1l10h4hlx0fw20nbnq76bbzzkzabjs4ll";
url = "http://www.ocaml.info/ocaml_sources/pcre-ocaml-${version}.tar.gz";
sha256 = "f1774028a4525d22d1f4cf4ce0121c99d85a75aed7a498c3e8ab0f5e39888e47";
};
buildInputs = [pcre ocaml findlib];
@ -21,7 +20,7 @@ stdenv.mkDerivation {
configurePhase = "true"; # Skip configure phase
meta = {
homepage = "http://www.ocaml.info/home/ocaml_sources.html#pcre-ocaml";
homepage = "http://www.ocaml.info/home/ocaml_sources.html";
description = "An efficient C-library for pattern matching with Perl-style regular expressions in OCaml";
license = "LGPL";
platforms = ocaml.meta.platforms;

@ -0,0 +1,51 @@
{stdenv, fetchurl, ocaml, findlib, python, ocaml_make}:
# The actual version of pycaml is unclear, as it is the original
# 0.82 version with some patches applied in order to use it for
# the kompostilo type setter (see README). Apparently, some of
# the patches provide Python 3.1 support.
# This version also differs from the Debian version, which
# is also a heavily patched 0.82.
# Therefore, we may at some point try to find out what is
# actually the "real" version (if the library is still alive).
stdenv.mkDerivation {
name = "pycaml-0.82";
src = fetchurl {
name = "pycaml.tar.gz";
url = "http://github.com/chemoelectric/pycaml/tarball/master";
sha256 = "ff6d863c42b4ef798f50ff5eff77b47b77b5c0d28b6f65364e8a436a216dc591";
};
buildInputs = [ocaml findlib python];
createFindlibDestdir = true;
phases = [ "unpackPhase" "patchPhase" "buildPhase" "installPhase" ];
# fix some paths to the appropriate store paths.
patchPhase = ''
sed -i "Makefile" -e's|/usr/include/OCamlMakefile|${ocaml_make}|g'
sed -i "Makefile" -e's|/usr|${python}|g'
'';
buildPhase = ''
make -f Makefile -j1 PYVER=`python -c 'import sys; print("{0}.{1}".format(sys.version_info.major, sys.version_info.minor));'`
'';
# the Makefile is not shipped with an install target, hence we do it ourselves.
installPhase = ''
ocamlfind install pycaml \
dllpycaml_stubs.so* libpycaml_stubs.a pycaml.a pycaml.cma \
pycaml.cmi pycaml.cmo pycaml.cmx pycaml.cmxa pycaml.ml pycaml.mli \
pycaml.o pycaml_stubs.c pycaml_stubs.h pycaml_stubs.o META
'';
meta = {
homepage = "http://github.com/chemoelectric/pycaml";
description = "Bindings for python and ocaml";
license = "LGPL";
platforms = ocaml.meta.platforms;
};
}

@ -0,0 +1,26 @@
{stdenv, fetchurl, ocaml, findlib, ocaml_typeconv}:
# note: only works with ocaml>3.12
# use version 5.2.0 if you still want an 3.11 version...
stdenv.mkDerivation {
name = "ocaml-sexplib-7.0.4";
src = fetchurl {
url = "http://forge.ocamlcore.org/frs/download.php/699/sexplib-7.0.4.tar.gz";
sha256 = "83c6c771f423d91bebc4f57202066358adf3775fb000dd780079f51436045a43";
};
buildInputs = [ocaml findlib ocaml_typeconv];
createFindlibDestdir = true;
configurePhase = "true";
meta = {
homepage = "http://forge.ocamlcore.org/projects/sexplib/";
description = "Library for serializing OCaml values to and from S-expressions.";
license = "LGPL";
platforms = ocaml.meta.platforms;
};
}

@ -0,0 +1,25 @@
{stdenv, fetchurl, ocaml, findlib}:
# note: works only with ocaml >3.12
stdenv.mkDerivation {
name = "ocaml-typeconv-3.0.4";
src = fetchurl {
url = "http://forge.ocamlcore.org/frs/download.php/697/ocaml-type-conv-3.0.4.tar.gz";
sha256 = "63b6f2872d29fb4c0b1448343bb5ec0649365126756128049d45a81238b59f12";
};
buildInputs = [ocaml findlib ];
createFindlibDestdir = true;
configurePhase = "true";
meta = {
homepage = "http://forge.ocamlcore.org/projects/type-conv/";
description = "Support library for OCaml preprocessor type conversions";
license = "LGPL";
platforms = ocaml.meta.platforms;
};
}

@ -1,14 +1,21 @@
{ fetchurl, stdenv, ocaml, perl, python, ncurses, makeWrapper }:
{ fetchurl, stdenv, perl, python, ncurses, makeWrapper
, ocaml, ocamlPackages }:
stdenv.mkDerivation rec {
name = "coccinelle-0.2.2";
name = "coccinelle-1.0.0-rc9";
src = fetchurl {
url = "http://coccinelle.lip6.fr/distrib/${name}.tgz";
sha256 = "1rnhxlqwcps67nyn61xj8mf6wdja29q8m16r4jwdwxvfpnsdhwfy";
sha256 = "75d5354e76500b627ccc33b8a929305e5a815ebf08027a8dc094f75ece241697";
};
buildInputs = [ ocaml perl python ncurses makeWrapper ];
buildInputs = [
ocaml ocamlPackages.findlib
ocamlPackages.menhir ocamlPackages.ocaml_batteries
ocamlPackages.ocaml_pcre ocamlPackages.ocaml_sexplib
ocamlPackages.ocaml_extlib ocamlPackages.pycaml
python ncurses makeWrapper perl
];
preConfigure =
'' sed -i "configure" -e's|/usr/bin/perl|${perl}/bin/perl|g'
@ -16,10 +23,13 @@ stdenv.mkDerivation rec {
-e"s|/usr/local/share|$out/share|g"
'';
buildPhase = "make depend && make all";
buildPhase = "make depend && make all && make all.opt";
# Note: The tests want $out/share/coccinelle/standard.h so they must be run
# after "make install".
# (I'm not sure if this is still needed.)
# Note: The check phase is now disabled completely, because the expected
# testing score is not always updated.
doCheck = false;
postInstall =

@ -2431,6 +2431,14 @@ let
ulex08 = callPackage ../development/ocaml-modules/ulex/0.8 {
camlp5 = camlp5_5_transitional;
};
ocaml_typeconv = callPackage ../development/ocaml-modules/typeconv { };
ocaml_sexplib = callPackage ../development/ocaml-modules/sexplib { };
ocaml_extlib = callPackage ../development/ocaml-modules/extlib { };
pycaml = callPackage ../development/ocaml-modules/pycaml { };
};
ocamlPackages = recurseIntoAttrs ocamlPackages_3_11_1;
@ -2438,6 +2446,8 @@ let
ocamlPackages_3_11_1 = mkOcamlPackages ocaml_3_11_1 pkgs.ocamlPackages_3_11_1;
ocamlPackages_3_12_1 = mkOcamlPackages ocaml_3_12_1 pkgs.ocamlPackages_3_12_1;
ocaml_make = callPackage ../development/ocaml-modules/ocamlmake { };
opa = let callPackage = newScope pkgs.ocamlPackages_3_12_1; in callPackage ../development/compilers/opa { };
ocamlnat = let callPackage = newScope pkgs.ocamlPackages_3_12_1; in callPackage ../development/ocaml-modules/ocamlnat { };
@ -2886,7 +2896,10 @@ let
cmakeWithGui = cmakeCurses.override { useQt4 = true; };
coccinelle = callPackage ../development/tools/misc/coccinelle { };
coccinelle = callPackage ../development/tools/misc/coccinelle {
ocamlPackages = ocamlPackages_3_12_1;
ocaml = ocaml_3_12_1;
};
cppi = callPackage ../development/tools/misc/cppi { };

Loading…
Cancel
Save