mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-06 02:06:46 +01:00
a13cdfe520
To keep this for the future we also strictDeps where possible, including for janePackages, topkg, oasis and ocamlbuild. This makes some closures significantly smaller and makes cross compilation easier
47 lines
1.1 KiB
Nix
47 lines
1.1 KiB
Nix
{ lib, fetchFromGitHub, buildDunePackage, pkg-config, dune-configurator, stdio, R
|
|
, alcotest
|
|
}:
|
|
|
|
buildDunePackage rec {
|
|
pname = "ocaml-r";
|
|
version = "0.4.0";
|
|
|
|
useDune2 = true;
|
|
|
|
minimumOCamlVersion = "4.08";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pveber";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "10is2s148kfh3g0pwniyzp5mh48k57ldvn8gm86469zvgxyij1ri";
|
|
};
|
|
|
|
# Without the following patch, stub generation fails with:
|
|
# > Fatal error: exception (Failure "not supported: osVersion")
|
|
preConfigure = ''
|
|
substituteInPlace stubgen/stubgen.ml --replace \
|
|
'failwithf "not supported: %s" name ()' \
|
|
'sprintf "(* not supported: %s *)" name'
|
|
substituteInPlace lib/config/discover.ml --replace \
|
|
' libRmath"' '"'
|
|
'';
|
|
|
|
# This currently fails with dune
|
|
strictDeps = false;
|
|
|
|
nativeBuildInputs = [ pkg-config R ];
|
|
buildInputs = [ dune-configurator stdio R ];
|
|
|
|
doCheck = true;
|
|
checkInputs = [ alcotest ];
|
|
|
|
meta = {
|
|
description = "OCaml bindings for the R interpreter";
|
|
inherit (src.meta) homepage;
|
|
license = lib.licenses.gpl3;
|
|
maintainers = [ lib.maintainers.bcdarwin ];
|
|
};
|
|
|
|
}
|