ocamlPackages.ocamlify: 0.0.2 -> 0.1.0 (#446289)

This commit is contained in:
Vincent Laporte
2025-09-26 14:26:56 +00:00
committed by GitHub
@@ -1,53 +1,33 @@
{
lib,
stdenv,
buildDunePackage,
fetchurl,
ocaml,
findlib,
ocamlbuild,
camlp-streams,
}:
lib.throwIf (lib.versionAtLeast ocaml.version "5.0")
"ocamlify is not available for OCaml ${ocaml.version}"
buildDunePackage (finalAttrs: {
pname = "ocamlify";
version = "0.1.0";
stdenv.mkDerivation
rec {
pname = "ocamlify";
version = "0.0.2";
src = fetchurl {
url = "https://github.com/gildor478/ocamlify/releases/download/v${finalAttrs.version}/ocamlify-${finalAttrs.version}.tbz";
hash = "sha256-u0pGiwLR/5N0eRv+eSkdR71snyiSDPwh8JwuxbcXIGA=";
};
src = fetchurl {
url = "https://forge.ocamlcore.org/frs/download.php/1209/${pname}-${version}.tar.gz";
sha256 = "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii";
};
propagatedBuildInputs = [
camlp-streams
];
strictDeps = true;
doCheck = true;
dontStrip = true;
nativeBuildInputs = [
ocaml
findlib
ocamlbuild
meta = {
homepage = "https://github.com/gildor478/ocamlify";
description = "Include files in OCaml code";
license = lib.licenses.lgpl21;
maintainers = with lib.maintainers; [
maggesi
];
configurePhase = ''
substituteInPlace src/ocamlify.ml --replace 'OCamlifyConfig.version' '"0.0.2"'
'';
buildPhase = "ocamlbuild src/ocamlify.native";
installPhase = ''
mkdir -p $out/bin
mv _build/src/ocamlify.native $out/bin/ocamlify
'';
dontStrip = true;
meta = {
homepage = "https://forge.ocamlcore.org/projects/ocamlmod/ocamlmod";
description = "Generate OCaml modules from source files";
platforms = ocaml.meta.platforms or [ ];
license = lib.licenses.lgpl21;
maintainers = with lib.maintainers; [
maggesi
];
};
}
mainProgram = "ocamlify";
};
})