summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authorArie Middelkoop <amiddelk@gmail.com>2012-04-09 09:42:20 +0000
committerArie Middelkoop <amiddelk@gmail.com>2012-04-09 09:42:20 +0000
commit2b18ccf305d59db465401d42f5bdf4c52692dca3 (patch)
tree3f09e504b71bc32d1bd555cd570fab8321999fb1 /pkgs/development/ocaml-modules
parent68f739cc45e6f4749dc0372dcc3f31d774cec0f3 (diff)
downloadnixpkgs-2b18ccf305d59db465401d42f5bdf4c52692dca3.tar
nixpkgs-2b18ccf305d59db465401d42f5bdf4c52692dca3.tar.gz
nixpkgs-2b18ccf305d59db465401d42f5bdf4c52692dca3.tar.bz2
nixpkgs-2b18ccf305d59db465401d42f5bdf4c52692dca3.tar.lz
nixpkgs-2b18ccf305d59db465401d42f5bdf4c52692dca3.tar.xz
nixpkgs-2b18ccf305d59db465401d42f5bdf4c52692dca3.tar.zst
nixpkgs-2b18ccf305d59db465401d42f5bdf4c52692dca3.zip
* Added "easytag", a GUI for organizing id3tags in mp3s.
* Updated some ocaml packages.
* Updated coccinelle.

svn path=/nixpkgs/trunk/; revision=33674
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/menhir/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/pycaml/default.nix68
-rw-r--r--pkgs/development/ocaml-modules/sexplib/default.nix14
-rw-r--r--pkgs/development/ocaml-modules/sexplib/sexp-3.10-compat.patch167
-rw-r--r--pkgs/development/ocaml-modules/typeconv/default.nix8
5 files changed, 211 insertions, 52 deletions
diff --git a/pkgs/development/ocaml-modules/menhir/default.nix b/pkgs/development/ocaml-modules/menhir/default.nix
index ea706ef511f..d02516e410a 100644
--- a/pkgs/development/ocaml-modules/menhir/default.nix
+++ b/pkgs/development/ocaml-modules/menhir/default.nix
@@ -2,7 +2,7 @@
 
 let
   ocaml_version = (builtins.parseDrvName ocaml.name).version;
-  version = "20090505";
+  version = "20120123";
 in
 
 stdenv.mkDerivation {
@@ -10,13 +10,11 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "http://pauillac.inria.fr/~fpottier/menhir/menhir-${version}.tar.gz";
-    sha256 = "1dsy80wp7k9wbxc89pjzy2izdkk4b72104m9ik747xzy23mssbyx";
+    sha256 = "65cd9e4f813c62697c60c344963ca11bd461169f574ba3a866c2691541cb4682";
   };
 
   buildInputs = [ocaml findlib];
 
-  configurePhase = "true";	# Skip configure
-
   createFindlibDestdir = true;
 
   preBuild = ''
diff --git a/pkgs/development/ocaml-modules/pycaml/default.nix b/pkgs/development/ocaml-modules/pycaml/default.nix
index b6c0df5ac15..070bd270b11 100644
--- a/pkgs/development/ocaml-modules/pycaml/default.nix
+++ b/pkgs/development/ocaml-modules/pycaml/default.nix
@@ -1,46 +1,46 @@
-{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";
-  };
+{stdenv, fetchurl, ocaml, findlib, ncurses, python, ocaml_make}:
 
-  buildInputs = [ocaml findlib python ocaml_make];
+# This is the original pycaml version with patches from debian.
 
-  createFindlibDestdir = true;
+let debian = fetchurl {
+      url = "mirror://debian/pool/main/p/pycaml/pycaml_0.82-14.debian.tar.gz";
+      sha256 = "a763088ec1fa76c769bf586ed6692e7ac035b0a2bfd48a90a8e7a9539ec0c2f1";
+    };
+
+in stdenv.mkDerivation {
+  name = "pycaml-0.82-14";
 
-  phases = [ "unpackPhase" "patchPhase" "buildPhase" "installPhase" ];
+  srcs = [
+    (fetchurl {
+      url = "mirror://debian/pool/main/p/pycaml/pycaml_0.82.orig.tar.gz";
+      sha256 = "d57be559c8d586c575717d47817986bbdbcebe2ffd16ad6b291525c62868babe";
+    })
 
-  # fix some paths to the appropriate store paths.
-  patchPhase = ''
-    sed -i "Makefile" -e's|/usr/include/OCamlMakefile|${ocaml_make}/include/OCamlMakefile|g'
-    sed -i "Makefile" -e's|/usr|${python}|g'
-    '';
+    (fetchurl {
+      url = "mirror://debian/pool/main/p/pycaml/pycaml_0.82-14.debian.tar.gz";
+      sha256 = "a763088ec1fa76c769bf586ed6692e7ac035b0a2bfd48a90a8e7a9539ec0c2f1";
+    })
+  ];
 
-  buildPhase = ''
-    make -f Makefile -j1 PYVER=`python -c 'import sys; print("{0}.{1}".format(sys.version_info.major, sys.version_info.minor));'`
-    '';
+  postPatch = ''
+    rm -f Makefile* configure*
+    cp ../debian/META ../debian/Makefile .
+    sed -i "Makefile" -e's|/usr/share/ocamlmakefile/OCamlMakefile|${ocaml_make}/include/OCamlMakefile|g'
+  '';
+
+  sourceRoot = "pycaml";
+  patches = [ "../debian/patches/*.patch" ];
+
+  buildInputs = [ ncurses ocaml findlib python ocaml_make ];
+  createFindlibDestdir = true;
 
   # 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
-    '';
+     dllpycaml_stubs.so libpycaml_stubs.a pycaml.a pycaml.cma \
+     pycaml.cmi pycaml.cmo pycaml.cmx pycaml.cmxa \
+     META
+  '';
 
   meta = {
     homepage = "http://github.com/chemoelectric/pycaml";
diff --git a/pkgs/development/ocaml-modules/sexplib/default.nix b/pkgs/development/ocaml-modules/sexplib/default.nix
index d2df36ec38d..d999dc471bd 100644
--- a/pkgs/development/ocaml-modules/sexplib/default.nix
+++ b/pkgs/development/ocaml-modules/sexplib/default.nix
@@ -1,22 +1,18 @@
 {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";
+  name = "ocaml-sexplib-7.0.5";
 
   src = fetchurl {
-    url = "http://forge.ocamlcore.org/frs/download.php/699/sexplib-7.0.4.tar.gz";
-    sha256 = "83c6c771f423d91bebc4f57202066358adf3775fb000dd780079f51436045a43";
+    url = "http://forge.ocamlcore.org/frs/download.php/832/sexplib-7.0.5.tar.gz";
+    sha256 = "b1022da052254581aae51fb634345920364439f715a2c786abcd0b828c2ce697";
   };
 
-  buildInputs = [ocaml findlib ocaml_typeconv];
+  patches = [ ./sexp-3.10-compat.patch ];
+  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.";
diff --git a/pkgs/development/ocaml-modules/sexplib/sexp-3.10-compat.patch b/pkgs/development/ocaml-modules/sexplib/sexp-3.10-compat.patch
new file mode 100644
index 00000000000..45e2abc6186
--- /dev/null
+++ b/pkgs/development/ocaml-modules/sexplib/sexp-3.10-compat.patch
@@ -0,0 +1,167 @@
+diff -ur orig/sexplib-7.0.5/lib/conv.ml sexplib-7.0.5/lib/conv.ml
+--- orig/sexplib-7.0.5/lib/conv.ml	2012-03-20 17:41:54.000000000 +0100
++++ sexplib-7.0.5/lib/conv.ml	2012-03-26 20:04:58.128032729 +0200
+@@ -665,7 +665,7 @@
+         | Parse_error pe ->
+             let ppos =
+               match pe.parse_state with
+-              | `Sexp { parse_pos } | `Annot { parse_pos } -> parse_pos
++              | `Sexp { parse_pos = parse_pos } | `Annot { parse_pos = parse_pos } -> parse_pos
+             in
+             List [
+               Atom "Sexplib.Sexp.Parse_error";
+diff -ur orig/sexplib-7.0.5/lib/pre_sexp.ml sexplib-7.0.5/lib/pre_sexp.ml
+--- orig/sexplib-7.0.5/lib/pre_sexp.ml	2012-03-20 17:41:54.000000000 +0100
++++ sexplib-7.0.5/lib/pre_sexp.ml	2012-03-26 20:04:58.129032741 +0200
+@@ -172,13 +172,7 @@
+ (* Output of S-expressions to file *)
+ 
+ let save_of_output ?perm output_function file sexp =
+-  let tmp_name, oc =
+-    let temp_dir =
+-      if Filename.is_relative file then "."
+-      else Filename.dir_sep
+-    in
+-    Filename.open_temp_file ~temp_dir file "tmp"
+-  in
++  let tmp_name, oc = Filename.open_temp_file file "tmp" in
+   try
+     output_function oc sexp;
+     close_out oc;
+@@ -316,9 +310,9 @@
+     else if text_char < 0 then fail "text_char < 0"
+     else if global_offset < 0 then fail "global_offset < 0"
+     else if buf_pos < 0 then fail "buf_pos < 0"
+-    else { text_line; text_char; global_offset; buf_pos }
++    else { text_line = text_line; text_char = text_char; global_offset = global_offset; buf_pos = buf_pos }
+ 
+-  let with_buf_pos t buf_pos = { t with buf_pos }
++  let with_buf_pos t buf_pos = { t with buf_pos = buf_pos }
+ end
+ 
+ type ('a, 't) parse_result =
+@@ -347,11 +341,11 @@
+ 
+ exception Parse_error of parse_error
+ 
+-let bump_text_line { parse_pos } =
++let bump_text_line { parse_pos = parse_pos } =
+   parse_pos.Parse_pos.text_line <- parse_pos.Parse_pos.text_line + 1;
+   parse_pos.Parse_pos.text_char <- 0
+ 
+-let bump_text_pos { parse_pos } =
++let bump_text_pos { parse_pos = parse_pos } =
+   parse_pos.Parse_pos.text_char <- parse_pos.Parse_pos.text_char + 1
+ 
+ let bump_pos_cont state str ~max_pos ~pos cont =
+@@ -378,18 +372,18 @@
+   parse_pos.Parse_pos.buf_pos <- buf_pos;
+   parse_pos.Parse_pos.global_offset <- parse_pos.Parse_pos.global_offset + len
+ 
+-let mk_parse_pos { parse_pos } buf_pos =
++let mk_parse_pos { parse_pos = parse_pos } buf_pos =
+   set_parse_pos parse_pos buf_pos;
+   parse_pos
+ 
+ let raise_parse_error parse_state location buf_pos err_msg =
+   begin
+     match parse_state with
+-    | `Sexp { parse_pos } | `Annot { parse_pos } ->
++    | `Sexp { parse_pos = parse_pos } | `Annot { parse_pos = parse_pos } ->
+         set_parse_pos parse_pos buf_pos;
+         parse_pos.Parse_pos.text_char <- parse_pos.Parse_pos.text_char + 1;
+   end;
+-  let parse_error = { location; err_msg; parse_state } in
++  let parse_error = { location = location; err_msg = err_msg; parse_state = parse_state } in
+   raise (Parse_error parse_error)
+ 
+ let raise_unexpected_char parse_state location buf_pos c =
+@@ -657,7 +651,7 @@
+     let max_pos = check_str_bounds "parse" ~pos ~len str in \
+     let state = \
+       { \
+-        parse_pos; \
++        parse_pos = parse_pos; \
+         pstack = INIT_PSTACK; \
+         pbuf = Buffer.create 128; \
+       } \
+@@ -681,20 +675,20 @@
+ 
+ let mk_annot_pos
+       ({ Parse_pos.text_line = line; text_char = col } as parse_pos) pos =
+-  { Annot.line; col; offset = get_glob_ofs parse_pos pos }
++  { Annot.line = line; col = col; offset = get_glob_ofs parse_pos pos }
+ 
+ let mk_annot_pos1
+       ({ Parse_pos.text_line = line; text_char = col } as parse_pos) pos =
+-  { Annot.line; col = col + 1; offset = get_glob_ofs parse_pos pos }
++  { Annot.line = line; col = col + 1; offset = get_glob_ofs parse_pos pos }
+ 
+-let add_annot_pos { parse_pos; pstack } pos =
++let add_annot_pos { parse_pos = parse_pos; pstack = pstack } pos =
+   pstack.Annot.positions <- mk_annot_pos parse_pos pos :: pstack.Annot.positions
+ 
+-let add_annot_pos1 { parse_pos; pstack } pos =
++let add_annot_pos1 { parse_pos = parse_pos; pstack = pstack } pos =
+   pstack.Annot.positions <-
+     mk_annot_pos1 parse_pos pos :: pstack.Annot.positions
+ 
+-let get_annot_range { parse_pos; pstack } pos =
++let get_annot_range { parse_pos = parse_pos; pstack = pstack } pos =
+   let start_pos =
+     match pstack.Annot.positions with
+     | [] -> assert false  (* impossible *)
+@@ -708,7 +702,7 @@
+       offset = get_glob_ofs parse_pos pos;
+     }
+   in
+-  { Annot.start_pos; end_pos }
++  { Annot.start_pos = start_pos; end_pos = end_pos }
+ 
+ let mk_annot_atom parse_state str pos =
+   Annot.Atom (get_annot_range parse_state pos, Atom str)
+@@ -780,7 +774,7 @@
+   let rec loop this_parse ~pos ~len ~is_incomplete =
+     if len > 0 then
+       match this_parse ~pos ~len buf with
+-      | Done (sexp, ({ Parse_pos.buf_pos } as parse_pos)) ->
++      | Done (sexp, ({ Parse_pos.buf_pos = buf_pos } as parse_pos)) ->
+           rev_sexps_ref := sexp :: !rev_sexps_ref;
+           let n_parsed = buf_pos - pos in
+           let this_parse = mk_this_parse ~parse_pos my_parse in
+@@ -813,7 +807,7 @@
+ 
+ let of_string_bigstring loc this_parse ws_buf get_len get_sub str =
+   match this_parse str with
+-  | Done (_, { Parse_pos.buf_pos }) when buf_pos <> get_len str ->
++  | Done (_, { Parse_pos.buf_pos = buf_pos }) when buf_pos <> get_len str ->
+       let prefix_len = min (get_len str - buf_pos) 20 in
+       let prefix = get_sub str buf_pos prefix_len in
+       let msg =
+@@ -874,7 +868,7 @@
+       failwith (sprintf "Sexplib.Sexp.gen_load_sexp: end of file: %s" file)
+     else
+       match this_parse ~pos:0 ~len buf with
+-      | Done (sexp, ({ Parse_pos.buf_pos } as parse_pos))
++      | Done (sexp, ({ Parse_pos.buf_pos = buf_pos } as parse_pos))
+         when strict ->
+           let rec strict_loop this_parse ~pos ~len =
+             match this_parse ~pos ~len buf with
+@@ -938,7 +932,7 @@
+ 
+   let get_conv_exn ~file ~exc annot_sexp =
+     let range = get_range annot_sexp in
+-    let { start_pos = { line; col } } = range in
++    let { start_pos = { line = line; col = col } } = range in
+     let loc = sprintf "%s:%d:%d" file line col in
+     Of_sexp_error (Annot.Conv_exn (loc, exc), get_sexp annot_sexp)
+ end
+@@ -1003,7 +997,7 @@
+   let sexp = of_string str in
+   try f sexp
+   with Of_sexp_error (exc, sub_sexp) ->
+-    raise (Of_string_conv_exn.E { Of_string_conv_exn.exc; sexp; sub_sexp })
++    raise (Of_string_conv_exn.E { Of_string_conv_exn.exc = exc; sexp = sexp; sub_sexp = sub_sexp })
+ 
+ let of_string_conv_exn str f = gen_of_string_conv_exn of_string str f
+ let of_bigstring_conv_exn bstr f = gen_of_string_conv_exn of_bigstring bstr f
diff --git a/pkgs/development/ocaml-modules/typeconv/default.nix b/pkgs/development/ocaml-modules/typeconv/default.nix
index c3ef8dd9856..299e7729b91 100644
--- a/pkgs/development/ocaml-modules/typeconv/default.nix
+++ b/pkgs/development/ocaml-modules/typeconv/default.nix
@@ -3,19 +3,17 @@
 # note: works only with ocaml >3.12
 
 stdenv.mkDerivation {
-  name = "ocaml-typeconv-3.0.4";
+  name = "ocaml-typeconv-3.0.5";
 
   src = fetchurl {
-    url = "http://forge.ocamlcore.org/frs/download.php/697/ocaml-type-conv-3.0.4.tar.gz";
-    sha256 = "63b6f2872d29fb4c0b1448343bb5ec0649365126756128049d45a81238b59f12";
+    url = "http://forge.ocamlcore.org/frs/download.php/821/type_conv-3.0.5.tar.gz";
+    sha256 = "90ac6c401a600a23012a3f513def6f67d4979b11bd551f4d0af78f0f0b479198";
   };
 
   buildInputs = [ocaml findlib ]; 
 
   createFindlibDestdir = true;
 
-  configurePhase = "true";
-
   meta = {
     homepage = "http://forge.ocamlcore.org/projects/type-conv/";
     description = "Support library for OCaml preprocessor type conversions";