ocamlPackages.ocaml-r: 0.4.0 -> 0.6.0 (#213545)

This commit is contained in:
Ulrik Strid 2023-02-01 11:21:55 +01:00 committed by GitHub
parent bbe465a8e4
commit 55fbb1d20c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,44 +1,37 @@
{ lib, fetchFromGitHub, buildDunePackage, pkg-config, dune-configurator, stdio, R { lib, fetchFromGitHub, fetchpatch, buildDunePackage, pkg-config, dune-configurator, stdio, R
, alcotest , alcotest
}: }:
buildDunePackage rec { buildDunePackage rec {
pname = "ocaml-r"; pname = "ocaml-r";
version = "0.4.0"; version = "0.6.0";
useDune2 = true; duneVersion = "3";
minimumOCamlVersion = "4.08"; minimalOCamlVersion = "4.08";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "pveber"; owner = "pveber";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "10is2s148kfh3g0pwniyzp5mh48k57ldvn8gm86469zvgxyij1ri"; sha256 = "sha256-jPyVMxjeh9+xu0dD1gelAxcOhxouKczyvzVoKZ5oSrs=";
}; };
# Without the following patch, stub generation fails with: # Finds R and Rmathlib separatley
# > Fatal error: exception (Failure "not supported: osVersion") patches = [
preConfigure = '' (fetchpatch {
substituteInPlace stubgen/stubgen.ml --replace \ url = "https://github.com/pveber/ocaml-r/commit/aa96dc5.patch";
'failwithf "not supported: %s" name ()' \ sha256 = "sha256-xW33W2ciesyUkDKEH08yfOXv0wP0V6X80or2/n2Nrb4=";
'sprintf "(* not supported: %s *)" name' })
substituteInPlace lib/config/discover.ml --replace \ ];
' libRmath"' '"'
'';
# This currently fails with dune
strictDeps = false;
nativeBuildInputs = [ pkg-config R ]; nativeBuildInputs = [ pkg-config R ];
buildInputs = [ dune-configurator stdio R ]; buildInputs = [ dune-configurator stdio R ];
doCheck = true; doCheck = true;
nativeCheckInputs = [ alcotest ]; checkInputs = [ alcotest ];
meta = { meta = {
# This has been broken by the update to R 4.2.0 (#171597)
broken = true;
description = "OCaml bindings for the R interpreter"; description = "OCaml bindings for the R interpreter";
inherit (src.meta) homepage; inherit (src.meta) homepage;
license = lib.licenses.gpl3; license = lib.licenses.gpl3;