megam: New package

Maximum Entropy (GA) Model Optimization Package

Eric Kow 9e457049 61cc18c5

+81
+46
pkgs/applications/science/misc/megam/default.nix
··· 1 + { fetchurl, stdenv, ocaml, makeWrapper, ncurses }: 2 + 3 + let version = "0.92"; in 4 + stdenv.mkDerivation rec { 5 + name = "megam-${version}"; 6 + 7 + src = fetchurl { 8 + url = "http://hal3.name/megam/megam_src.tgz"; 9 + sha256 = "dc0e9f59ff8513449fe3bd40b260141f89c88a4edf6ddc8b8a394c758e49724e"; 10 + }; 11 + 12 + patches = [ ./ocaml-includes.patch ./ocaml-3.12.patch ]; 13 + 14 + buildInputs = [ ocaml ncurses ]; 15 + 16 + nativeBuildInputs = [ makeWrapper ]; 17 + 18 + makeFlags = "CAML_INCLUDES=${ocaml}/lib/ocaml/caml"; 19 + 20 + # see https://bugzilla.redhat.com/show_bug.cgi?id=435559 21 + dontStrip = true; 22 + 23 + installPhase = '' 24 + mkdir -pv $out/bin 25 + cp -Rv megam $out/bin 26 + ''; 27 + 28 + 29 + meta = { 30 + description = "MEGA Model Optimization Package"; 31 + 32 + longDescription = 33 + '' The software here is an implementation of maximum likelihood 34 + and maximum a posterior optimization of the parameters of 35 + these models. The algorithms used are much more efficient 36 + than the iterative scaling techniques used in almost every 37 + other maxent package out there. ''; 38 + 39 + homepage = http://www.umiacs.umd.edu/~hal/megam; 40 + 41 + license = "non-commercial"; 42 + 43 + maintainers = [ ]; 44 + platforms = stdenv.lib.platforms.gnu; # arbitrary choice 45 + }; 46 + }
+12
pkgs/applications/science/misc/megam/ocaml-3.12.patch
··· 1 + diff -ru megam_0.92/Makefile megam_0.92-b/Makefile 2 + --- megam_0.92/Makefile 2007-10-08 18:06:04.000000000 +0100 3 + +++ megam_0.92-b/Makefile 2013-11-25 10:14:20.000000000 +0000 4 + @@ -59,7 +59,7 @@ 5 + 6 + WITHUNIX =unix.cma -cclib -lunix 7 + 8 + -WITHSTR =str.cma -cclib -lstr 9 + +WITHSTR =str.cma -cclib -lcamlstr 10 + 11 + WITHBIGARRAY =bigarray.cma -cclib -lbigarray 12 +
+21
pkgs/applications/science/misc/megam/ocaml-includes.patch
··· 1 + diff -ru megam_0.92/Makefile megam_0.92-b/Makefile 2 + --- megam_0.92/Makefile 2007-10-08 18:06:04.000000000 +0100 3 + +++ megam_0.92-b/Makefile 2013-11-25 10:14:20.000000000 +0000 4 + @@ -41,7 +41,7 @@ 5 + # 6 + # The Caml compilers. # 7 + # You may fix here the path to access the Caml compiler on your machine 8 + -CAMLC = ocamlc -g 9 + +CAMLC = ocamlc -g $(WITHCLIBS) 10 + CAMLOPT = ocamlopt -unsafe -ccopt -O4 -ccopt -ffast-math -inline 99999 11 + CAMLDEP = ocamldep 12 + CAMLLEX = ocamllex 13 + @@ -70,7 +70,7 @@ 14 + WITHDBM =dbm.cma -cclib -lmldbm -cclib -lndbm 15 + 16 + #WITHCLIBS =-I /usr/lib/ocaml/3.09.2/caml 17 + -WITHCLIBS =-I /usr/lib/ocaml/caml 18 + +WITHCLIBS =-I $(CAML_INCLUDES) 19 + 20 + ################ End of user's variables ##################### 21 +
+2
pkgs/top-level/all-packages.nix
··· 10352 10352 10353 10353 golly = callPackage ../applications/science/misc/golly { }; 10354 10354 10355 + megam = callPackage ../applications/science/misc/megam { }; 10356 + 10355 10357 root = callPackage ../applications/science/misc/root { }; 10356 10358 10357 10359 simgrid = callPackage ../applications/science/misc/simgrid { };