Skip to content

Instantly share code, notes, and snippets.

@kowey
Last active August 29, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kowey/10724113 to your computer and use it in GitHub Desktop.
Save kowey/10724113 to your computer and use it in GitHub Desktop.
{ 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-3.12.patch ];
buildInputs = [ ocaml ncurses ];
nativeBuildInputs = [ makeWrapper ];
# FIXME: don't want hardcoded ocaml path, but I suppose somehow coming
# out of the ocaml var instead
makeFlags = "CAML_INCLUDES=/nix/store/7rhrr4j9jhbwx2gjjx2hd7nmv1b19m6h-ocaml-3.12.1/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
};
}
{ 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-3.12.patch ];
buildInputs = [ ocaml ncurses ];
nativeBuildInputs = [ makeWrapper ];
# FIXME: don't want hardcoded ocaml path, but I suppose somehow coming
# out of the ocaml var instead
makeFlags = "CAML_INCLUDES=/nix/store/7rhrr4j9jhbwx2gjjx2hd7nmv1b19m6h-ocaml-3.12.1/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
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment