reason: ppxlib migration (#126066)
* reason: refactoring * reason: add superherointj as maintainer * reason: ppxlib migration Migrate from ocaml-migrate-parsetree to ppxlib fixing conflicts in downstream dependencies. * reason: add downloadPage to meta * reason: removed maintainer volth by his request * reason: add test hello
This commit is contained in:
parent
70346bf6d0
commit
e075fef89f
@ -1,5 +1,5 @@
|
||||
{ lib, stdenv, makeWrapper, fetchFromGitHub, ocaml, findlib, dune_2
|
||||
, fix, menhir, menhirLib, menhirSdk, merlin-extend, ppx_tools_versioned, utop, cppo
|
||||
{ lib, callPackage, stdenv, makeWrapper, fetchFromGitHub, ocaml, findlib, dune_2
|
||||
, fix, menhir, menhirLib, menhirSdk, merlin-extend, ppxlib, utop, cppo, ppx_derivers
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -13,11 +13,28 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0m6ldrci1a4j0qv1cbwh770zni3al8qxsphl353rv19f6rblplhs";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper menhir ];
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
menhir
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ menhirLib merlin-extend ppx_tools_versioned ];
|
||||
buildInputs = [
|
||||
cppo
|
||||
dune_2
|
||||
findlib
|
||||
fix
|
||||
menhir
|
||||
menhirSdk
|
||||
ocaml
|
||||
ppxlib
|
||||
utop
|
||||
];
|
||||
|
||||
buildInputs = [ ocaml findlib dune_2 cppo fix utop menhir menhirSdk ];
|
||||
propagatedBuildInputs = [
|
||||
menhirLib
|
||||
merlin-extend
|
||||
ppx_derivers
|
||||
];
|
||||
|
||||
buildFlags = [ "build" ]; # do not "make tests" before reason lib is installed
|
||||
|
||||
@ -29,11 +46,16 @@ stdenv.mkDerivation rec {
|
||||
--prefix OCAMLPATH : "$OCAMLPATH:$OCAMLFIND_DESTDIR"
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
hello = callPackage ./tests/hello { };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://reasonml.github.io/";
|
||||
downloadPage = "https://github.com/reasonml/reason";
|
||||
description = "Facebook's friendly syntax to OCaml";
|
||||
license = licenses.mit;
|
||||
inherit (ocaml.meta) platforms;
|
||||
maintainers = [ maintainers.volth ];
|
||||
maintainers = with maintainers; [ superherointj ];
|
||||
};
|
||||
}
|
||||
|
23
pkgs/development/compilers/reason/tests/hello/default.nix
Normal file
23
pkgs/development/compilers/reason/tests/hello/default.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{ lib, buildDunePackage, reason }:
|
||||
|
||||
buildDunePackage rec {
|
||||
pname = "helloreason";
|
||||
version = "0.0.1";
|
||||
|
||||
src = ./.;
|
||||
|
||||
useDune2 = true;
|
||||
|
||||
buildInputs = [
|
||||
reason
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
doInstallCheck = true;
|
||||
postInstallCheck = ''
|
||||
$out/bin/${pname} | grep -q "Hello From Reason" > /dev/null
|
||||
'';
|
||||
|
||||
meta.timeout = 60;
|
||||
}
|
4
pkgs/development/compilers/reason/tests/hello/dune
Normal file
4
pkgs/development/compilers/reason/tests/hello/dune
Normal file
@ -0,0 +1,4 @@
|
||||
(executable
|
||||
(name helloreason)
|
||||
(public_name helloreason)
|
||||
(libraries reason))
|
@ -0,0 +1,6 @@
|
||||
let sayHello = () => {
|
||||
let fromWhom = "From Reason";
|
||||
print_endline("Hello " ++ fromWhom);
|
||||
};
|
||||
|
||||
sayHello();
|
Loading…
Reference in New Issue
Block a user