2023-02-02 18:25:31 +00:00
|
|
|
{ lib, fetchFromGitHub, fetchpatch, buildDunePackage, pkg-config, dune-configurator, stdio, R
|
2020-12-25 13:55:36 +00:00
|
|
|
, alcotest
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildDunePackage rec {
|
|
|
|
pname = "ocaml-r";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "0.6.0";
|
2020-12-25 13:55:36 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
duneVersion = "3";
|
2020-12-25 13:55:36 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
minimalOCamlVersion = "4.08";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pveber";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-02-02 18:25:31 +00:00
|
|
|
sha256 = "sha256-jPyVMxjeh9+xu0dD1gelAxcOhxouKczyvzVoKZ5oSrs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
# Finds R and Rmathlib separatley
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/pveber/ocaml-r/commit/aa96dc5.patch";
|
|
|
|
sha256 = "sha256-xW33W2ciesyUkDKEH08yfOXv0wP0V6X80or2/n2Nrb4=";
|
|
|
|
})
|
|
|
|
];
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config R ];
|
|
|
|
buildInputs = [ dune-configurator stdio R ];
|
2020-12-25 13:55:36 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkInputs = [ alcotest ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "OCaml bindings for the R interpreter";
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
license = lib.licenses.gpl3;
|
|
|
|
maintainers = [ lib.maintainers.bcdarwin ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|