Files
nixpkgs/pkgs/development/compilers/reason/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

73 lines
1.3 KiB
Nix

{
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.2";
hash = "sha256-f0CHAW6MOToT1Xt3N2d7wdvxaXj9Q8GTVNTXmnlMjEc=";
}
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 = {
homepage = "https://reasonml.github.io/";
downloadPage = "https://github.com/reasonml/reason";
description = "User-friendly programming language built on OCaml";
license = lib.licenses.mit;
maintainers = [ ];
};
}