push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,72 @@
{
lib,
callPackage,
buildDunePackage,
fetchurl,
fix,
menhir,
menhirLib,
menhirSdk,
merlin-extend,
ppxlib,
cppo,
cmdliner,
dune-build-info,
}:
let
param =
if lib.versionAtLeast ppxlib.version "0.36" then
{
version = "3.17.0";
hash = "sha256-gsiBnOn9IVt+fixlAeY456kE6+E6taHY6sJnnYz4pes=";
}
else
{
version = "3.15.0";
hash = "sha256-7D0gJfQ5Hw0riNIFPmJ6haoa3dnFEyDp5yxpDgX7ZqY=";
};
in
buildDunePackage rec {
pname = "reason";
inherit (param) version;
minimalOCamlVersion = "4.11";
src = fetchurl {
url = "https://github.com/reasonml/reason/releases/download/${version}/reason-${version}.tbz";
inherit (param) hash;
};
nativeBuildInputs = [
menhir
cppo
];
buildInputs = [
dune-build-info
fix
menhirSdk
merlin-extend
]
++ lib.optional (lib.versionAtLeast version "3.17") cmdliner;
propagatedBuildInputs = [
ppxlib
menhirLib
];
passthru.tests = {
hello = callPackage ./tests/hello { };
};
meta = with lib; {
homepage = "https://reasonml.github.io/";
downloadPage = "https://github.com/reasonml/reason";
description = "User-friendly programming language built on OCaml";
license = licenses.mit;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,34 @@
{
buildDunePackage,
reason,
cppo,
utop,
makeWrapper,
}:
buildDunePackage {
pname = "rtop";
inherit (reason) version src;
nativeBuildInputs = [
makeWrapper
cppo
];
propagatedBuildInputs = [
reason
utop
];
postInstall = ''
wrapProgram $out/bin/rtop \
--prefix PATH : "${utop}/bin" \
--prefix CAML_LD_LIBRARY_PATH : "$CAML_LD_LIBRARY_PATH" \
--prefix OCAMLPATH : "$OCAMLPATH:$OCAMLFIND_DESTDIR"
'';
meta = reason.meta // {
description = "Toplevel (or REPL) for Reason, based on utop";
mainProgram = "rtop";
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
buildDunePackage,
reason,
}:
buildDunePackage rec {
pname = "helloreason";
version = "0.0.1";
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./helloreason.opam
./helloreason.re
./dune-project
./dune
];
};
nativeBuildInputs = [
reason
];
buildInputs = [
reason
];
doCheck = true;
doInstallCheck = true;
postInstallCheck = ''
$out/bin/${pname} | grep -q "Hello From Reason" > /dev/null
'';
meta.timeout = 60;
}

View File

@@ -0,0 +1,4 @@
(executable
(name helloreason)
(public_name helloreason)
(libraries reason))

View File

@@ -0,0 +1 @@
(lang dune 3.10)

View File

@@ -0,0 +1,6 @@
let sayHello = () => {
let fromWhom = "From Reason";
print_endline("Hello " ++ fromWhom);
};
sayHello();