forked from mirrors/nixpkgs
commit
b1fad4ab9b
46
pkgs/applications/science/misc/megam/default.nix
Normal file
46
pkgs/applications/science/misc/megam/default.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ fetchurl, stdenv, ocaml, makeWrapper, ncurses }:
|
||||
|
||||
let version = "0.92"; in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "megam-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://hal3.name/megam/megam_src.tgz";
|
||||
sha256 = "dc0e9f59ff8513449fe3bd40b260141f89c88a4edf6ddc8b8a394c758e49724e";
|
||||
};
|
||||
|
||||
patches = [ ./ocaml-includes.patch ./ocaml-3.12.patch ];
|
||||
|
||||
buildInputs = [ ocaml ncurses ];
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
makeFlags = "CAML_INCLUDES=${ocaml}/lib/ocaml/caml";
|
||||
|
||||
# see https://bugzilla.redhat.com/show_bug.cgi?id=435559
|
||||
dontStrip = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -pv $out/bin
|
||||
cp -Rv megam $out/bin
|
||||
'';
|
||||
|
||||
|
||||
meta = {
|
||||
description = "MEGA Model Optimization Package";
|
||||
|
||||
longDescription =
|
||||
'' The software here is an implementation of maximum likelihood
|
||||
and maximum a posterior optimization of the parameters of
|
||||
these models. The algorithms used are much more efficient
|
||||
than the iterative scaling techniques used in almost every
|
||||
other maxent package out there. '';
|
||||
|
||||
homepage = http://www.umiacs.umd.edu/~hal/megam;
|
||||
|
||||
license = "non-commercial";
|
||||
|
||||
maintainers = [ ];
|
||||
platforms = stdenv.lib.platforms.gnu; # arbitrary choice
|
||||
};
|
||||
}
|
12
pkgs/applications/science/misc/megam/ocaml-3.12.patch
Normal file
12
pkgs/applications/science/misc/megam/ocaml-3.12.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -ru megam_0.92/Makefile megam_0.92-b/Makefile
|
||||
--- megam_0.92/Makefile 2007-10-08 18:06:04.000000000 +0100
|
||||
+++ megam_0.92-b/Makefile 2013-11-25 10:14:20.000000000 +0000
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
WITHUNIX =unix.cma -cclib -lunix
|
||||
|
||||
-WITHSTR =str.cma -cclib -lstr
|
||||
+WITHSTR =str.cma -cclib -lcamlstr
|
||||
|
||||
WITHBIGARRAY =bigarray.cma -cclib -lbigarray
|
||||
|
21
pkgs/applications/science/misc/megam/ocaml-includes.patch
Normal file
21
pkgs/applications/science/misc/megam/ocaml-includes.patch
Normal file
|
@ -0,0 +1,21 @@
|
|||
diff -ru megam_0.92/Makefile megam_0.92-b/Makefile
|
||||
--- megam_0.92/Makefile 2007-10-08 18:06:04.000000000 +0100
|
||||
+++ megam_0.92-b/Makefile 2013-11-25 10:14:20.000000000 +0000
|
||||
@@ -41,7 +41,7 @@
|
||||
#
|
||||
# The Caml compilers. #
|
||||
# You may fix here the path to access the Caml compiler on your machine
|
||||
-CAMLC = ocamlc -g
|
||||
+CAMLC = ocamlc -g $(WITHCLIBS)
|
||||
CAMLOPT = ocamlopt -unsafe -ccopt -O4 -ccopt -ffast-math -inline 99999
|
||||
CAMLDEP = ocamldep
|
||||
CAMLLEX = ocamllex
|
||||
@@ -70,7 +70,7 @@
|
||||
WITHDBM =dbm.cma -cclib -lmldbm -cclib -lndbm
|
||||
|
||||
#WITHCLIBS =-I /usr/lib/ocaml/3.09.2/caml
|
||||
-WITHCLIBS =-I /usr/lib/ocaml/caml
|
||||
+WITHCLIBS =-I $(CAML_INCLUDES)
|
||||
|
||||
################ End of user's variables #####################
|
||||
|
|
@ -10348,6 +10348,8 @@ let
|
|||
|
||||
golly = callPackage ../applications/science/misc/golly { };
|
||||
|
||||
megam = callPackage ../applications/science/misc/megam { };
|
||||
|
||||
root = callPackage ../applications/science/misc/root { };
|
||||
|
||||
simgrid = callPackage ../applications/science/misc/simgrid { };
|
||||
|
|
Loading…
Reference in a new issue