ocamlPackages.ocamlmod: 0.0.9 -> 0.1.1 (#446286)

Changed files
+69 -89
pkgs
development
tools
ocaml
oasis
ocamlmod
+47 -44
pkgs/development/tools/ocaml/oasis/default.nix
···
ocamlify,
}:
-
stdenv.mkDerivation {
-
version = "0.4.11";
-
pname = "ocaml-oasis";
+
lib.throwIf (lib.versionAtLeast ocaml.version "5.0") "oasis is not available for OCaml ≥ 5.0"
-
src = fetchurl {
-
url = "https://download.ocamlcore.org/oasis/oasis/0.4.11/oasis-0.4.11.tar.gz";
-
hash = "sha256-GLc97vTtbpqDM38ks7vi3tZSaLP/cwn8wA0l5X4dwS4=";
-
};
+
stdenv.mkDerivation
+
{
+
version = "0.4.11";
+
pname = "ocaml-oasis";
-
createFindlibDestdir = true;
+
src = fetchurl {
+
url = "https://download.ocamlcore.org/oasis/oasis/0.4.11/oasis-0.4.11.tar.gz";
+
hash = "sha256-GLc97vTtbpqDM38ks7vi3tZSaLP/cwn8wA0l5X4dwS4=";
+
};
-
strictDeps = true;
+
createFindlibDestdir = true;
-
nativeBuildInputs = [
-
ocaml
-
findlib
-
ocamlbuild
-
ocamlmod
-
ocamlify
-
];
+
strictDeps = true;
+
+
nativeBuildInputs = [
+
ocaml
+
findlib
+
ocamlbuild
+
ocamlmod
+
ocamlify
+
];
-
buildInputs = [ ocamlbuild ];
+
buildInputs = [ ocamlbuild ];
-
configurePhase = ''
-
runHook preConfigure
-
ocaml setup.ml -configure --prefix $out
-
runHook postConfigure
-
'';
-
buildPhase = ''
-
runHook preBuild
-
ocaml setup.ml -build
-
runHook postBuild
-
'';
-
installPhase = ''
-
runHook preInstall
-
ocaml setup.ml -install
-
runHook postInstall
-
'';
+
configurePhase = ''
+
runHook preConfigure
+
ocaml setup.ml -configure --prefix $out
+
runHook postConfigure
+
'';
+
buildPhase = ''
+
runHook preBuild
+
ocaml setup.ml -build
+
runHook postBuild
+
'';
+
installPhase = ''
+
runHook preInstall
+
ocaml setup.ml -install
+
runHook postInstall
+
'';
-
meta = with lib; {
-
description = "Configure, build and install system for OCaml projects";
-
homepage = "https://github.com/ocaml/oasis";
-
license = licenses.lgpl21;
-
maintainers = with maintainers; [
-
vbgl
-
maggesi
-
];
-
mainProgram = "oasis";
-
inherit (ocaml.meta) platforms;
-
};
-
}
+
meta = with lib; {
+
description = "Configure, build and install system for OCaml projects";
+
homepage = "https://github.com/ocaml/oasis";
+
license = licenses.lgpl21;
+
maintainers = with maintainers; [
+
vbgl
+
maggesi
+
];
+
mainProgram = "oasis";
+
inherit (ocaml.meta) platforms;
+
};
+
}
+22 -45
pkgs/development/tools/ocaml/ocamlmod/default.nix
···
{
lib,
-
stdenv,
+
ocaml,
+
buildDunePackage,
fetchurl,
-
ocaml,
-
findlib,
-
ocamlbuild,
-
ounit,
+
ounit2,
}:
-
let
-
# ounit is only available for OCaml >= 4.08
-
doCheck = lib.versionAtLeast ocaml.version "4.08";
-
in
+
buildDunePackage (finalAttrs: {
+
pname = "ocamlmod";
+
version = "0.1.1";
-
lib.throwIf (lib.versionAtLeast ocaml.version "5.0") "ocamlmod is not available for OCaml ≥ 5.0"
+
minimalOCamlVersion = "4.03";
-
stdenv.mkDerivation
-
{
-
pname = "ocamlmod";
-
version = "0.0.9";
+
src = fetchurl {
+
url = "https://github.com/gildor478/ocamlmod/releases/download/v${finalAttrs.version}/ocamlmod-${finalAttrs.version}.tbz";
+
hash = "sha256-qMG+y/iS+L4qtKiJX01pTTAdQuGLoIA+so1fqY9bm8o=";
+
};
-
src = fetchurl {
-
url = "https://forge.ocamlcore.org/frs/download.php/1702/ocamlmod-0.0.9.tar.gz";
-
sha256 = "0cgp9qqrq7ayyhddrmqmq1affvfqcn722qiakjq4dkywvp67h4aa";
-
};
+
doCheck = lib.versionAtLeast ocaml.version "4.08";
+
checkInputs = [ ounit2 ];
-
strictDeps = !doCheck;
+
dontStrip = true;
-
nativeBuildInputs = [
-
ocaml
-
findlib
-
ocamlbuild
+
meta = {
+
homepage = "https://github.com/gildor478/ocamlmod";
+
description = "Generate OCaml modules from source files";
+
maintainers = with lib.maintainers; [
+
maggesi
];
-
-
configurePhase =
-
"ocaml setup.ml -configure --prefix $out" + lib.optionalString doCheck " --enable-tests";
-
buildPhase = "ocaml setup.ml -build";
-
installPhase = "ocaml setup.ml -install";
-
-
inherit doCheck;
-
nativeCheckInputs = [ ounit ];
-
-
checkPhase = "ocaml setup.ml -test";
-
-
dontStrip = true;
-
-
meta = {
-
homepage = "https://forge.ocamlcore.org/projects/ocamlmod/ocamlmod";
-
description = "Generate OCaml modules from source files";
-
platforms = ocaml.meta.platforms or [ ];
-
maintainers = with lib.maintainers; [
-
maggesi
-
];
-
};
-
}
+
mainProgram = "ocamlmod";
+
};
+
})