megam: migrate to by-name; switch to ocaml-ng 4.14; modernize derivation (#539761)

This commit is contained in:
Weijia Wang
2026-07-10 10:45:46 +00:00
committed by GitHub
4 changed files with 10 additions and 9 deletions
@@ -2,17 +2,21 @@
lib,
stdenv,
fetchurl,
ocaml,
ocaml-ng,
ncurses,
}:
let
inherit (ocaml-ng.ocamlPackages_4_14) ocaml;
in
stdenv.mkDerivation {
pname = "megam";
version = "0.92";
src = fetchurl {
url = "http://hal3.name/megam/megam_src.tgz";
sha256 = "dc0e9f59ff8513449fe3bd40b260141f89c88a4edf6ddc8b8a394c758e49724e";
hash = "sha256-3A6fWf+FE0Sf471AsmAUH4nIik7fbdyLijlMdY5Jck4=";
};
patches = [
@@ -23,12 +27,13 @@ stdenv.mkDerivation {
postPatch = ''
# Deprecated in ocaml 3.10 https://github.com/ocaml/ocaml/commit/f6190f3d0c49c5220d443ee8d03ca5072d68aa87
# Deprecated in ocaml 3.08 https://github.com/ocaml/ocaml/commit/0c7aecb88dc696f66f49f3bed54a037361a26b8d
substituteInPlace fastdot_c.c --replace copy_double caml_copy_double --replace Bigarray_val Caml_ba_array_val --replace caml_bigarray caml_ba_array
substituteInPlace fastdot_c.c --replace-fail copy_double caml_copy_double --replace-fail Bigarray_val Caml_ba_array_val --replace-fail caml_bigarray caml_ba_array
# They were already deprecated in 3.12 https://v2.ocaml.org/releases/3.12/htmlman/libref/Array.html
substituteInPlace abffs.ml main.ml --replace create_matrix make_matrix
substituteInPlace intHashtbl.ml --replace Array.create Array.make
substituteInPlace abffs.ml main.ml --replace-fail create_matrix make_matrix
substituteInPlace intHashtbl.ml --replace-fail Array.create Array.make
'';
strictDeps = true;
__structuredAttrs = true;
nativeBuildInputs = [ ocaml ];
-4
View File
@@ -10629,10 +10629,6 @@ with pkgs;
cudaSupport = true;
};
megam = callPackage ../applications/science/misc/megam {
inherit (ocaml-ng.ocamlPackages_4_14) ocaml;
};
spyder = with python3.pkgs; toPythonApplication spyder;
### SCIENCE / PHYSICS