From d85fae35d94dd270b5904c7d9cd516a2cd45f4bc Mon Sep 17 00:00:00 2001 From: LeixB Date: Fri, 15 Apr 2022 11:43:47 +0200 Subject: [PATCH 1/2] megam: add megam.opt binary - Add megam.opt (optimized native binary) --- .../science/misc/megam/default.nix | 43 +++++++++++-------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/pkgs/applications/science/misc/megam/default.nix b/pkgs/applications/science/misc/megam/default.nix index e71c232be8f0..458b6ae04cd4 100644 --- a/pkgs/applications/science/misc/megam/default.nix +++ b/pkgs/applications/science/misc/megam/default.nix @@ -1,9 +1,13 @@ -{ fetchurl, lib, stdenv, ocaml, makeWrapper, ncurses }: +{ lib +, stdenv +, fetchurl +, ocaml +, ncurses +}: -let version = "0.92"; in stdenv.mkDerivation { pname = "megam"; - inherit version; + version = "0.92"; src = fetchurl { url = "http://hal3.name/megam/megam_src.tgz"; @@ -22,39 +26,40 @@ stdenv.mkDerivation { ''; strictDeps = true; - nativeBuildInputs = [ makeWrapper ocaml ]; + nativeBuildInputs = [ ocaml ]; buildInputs = [ ncurses ]; makeFlags = [ "CAML_INCLUDES=${ocaml}/lib/ocaml/caml" ("WITHBIGARRAY=" + lib.optionalString (lib.versionOlder ocaml.version "4.08.0") "bigarray.cma") + "all" + "opt" ]; # see https://bugzilla.redhat.com/show_bug.cgi?id=435559 dontStrip = true; installPhase = '' - mkdir -pv $out/bin - cp -Rv megam $out/bin + runHook preInstall + + install -Dm755 megam $out/bin/megam + install -Dm755 megam.opt $out/bin/megam.opt + + runHook postInstall ''; - - meta = { + meta = with lib; { 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. ''; - + 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 = lib.platforms.unix; + platforms = platforms.unix; }; } From d443805fe39d40e2c4bd31e3e54193f42735757b Mon Sep 17 00:00:00 2001 From: LeixB Date: Fri, 24 Mar 2023 18:52:48 +0100 Subject: [PATCH 2/2] megam: add leixb as maintainer --- pkgs/applications/science/misc/megam/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/science/misc/megam/default.nix b/pkgs/applications/science/misc/megam/default.nix index 458b6ae04cd4..cae0fe9b26fd 100644 --- a/pkgs/applications/science/misc/megam/default.nix +++ b/pkgs/applications/science/misc/megam/default.nix @@ -59,7 +59,7 @@ stdenv.mkDerivation { ''; homepage = "http://www.umiacs.umd.edu/~hal/megam"; license = "non-commercial"; - maintainers = [ ]; + maintainers = with maintainers; [ leixb ]; platforms = platforms.unix; }; }