From 55fbb1d20ce4350aae11bba71844796549175ab1 Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Wed, 1 Feb 2023 11:21:55 +0100 Subject: [PATCH] ocamlPackages.ocaml-r: 0.4.0 -> 0.6.0 (#213545) --- .../ocaml-modules/ocaml-r/default.nix | 33 ++++++++----------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/pkgs/development/ocaml-modules/ocaml-r/default.nix b/pkgs/development/ocaml-modules/ocaml-r/default.nix index fd628e7651c..8de5abf7e48 100644 --- a/pkgs/development/ocaml-modules/ocaml-r/default.nix +++ b/pkgs/development/ocaml-modules/ocaml-r/default.nix @@ -1,44 +1,37 @@ -{ lib, fetchFromGitHub, buildDunePackage, pkg-config, dune-configurator, stdio, R +{ lib, fetchFromGitHub, fetchpatch, buildDunePackage, pkg-config, dune-configurator, stdio, R , alcotest }: buildDunePackage rec { pname = "ocaml-r"; - version = "0.4.0"; + version = "0.6.0"; - useDune2 = true; + duneVersion = "3"; - minimumOCamlVersion = "4.08"; + minimalOCamlVersion = "4.08"; src = fetchFromGitHub { owner = "pveber"; repo = pname; rev = "v${version}"; - sha256 = "10is2s148kfh3g0pwniyzp5mh48k57ldvn8gm86469zvgxyij1ri"; + sha256 = "sha256-jPyVMxjeh9+xu0dD1gelAxcOhxouKczyvzVoKZ5oSrs="; }; - # 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; + # Finds R and Rmathlib separatley + patches = [ + (fetchpatch { + url = "https://github.com/pveber/ocaml-r/commit/aa96dc5.patch"; + sha256 = "sha256-xW33W2ciesyUkDKEH08yfOXv0wP0V6X80or2/n2Nrb4="; + }) + ]; nativeBuildInputs = [ pkg-config R ]; buildInputs = [ dune-configurator stdio R ]; doCheck = true; - nativeCheckInputs = [ alcotest ]; + checkInputs = [ alcotest ]; meta = { - # This has been broken by the update to R 4.2.0 (#171597) - broken = true; description = "OCaml bindings for the R interpreter"; inherit (src.meta) homepage; license = lib.licenses.gpl3;