summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/ocaml-r
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2020-03-26 03:56:56 +0100
committerVincent Laporte <vbgl@users.noreply.github.com>2020-04-01 17:29:30 +0200
commit8e686bacc4e627da1080a5ad5769ead230e5ba69 (patch)
treed25c6b15d948566a8457174ca2f4812596ecc211 /pkgs/development/ocaml-modules/ocaml-r
parent5853515f6c1584a5421a3bfcddc822ee4a6e6fce (diff)
downloadnixpkgs-8e686bacc4e627da1080a5ad5769ead230e5ba69.tar
nixpkgs-8e686bacc4e627da1080a5ad5769ead230e5ba69.tar.gz
nixpkgs-8e686bacc4e627da1080a5ad5769ead230e5ba69.tar.bz2
nixpkgs-8e686bacc4e627da1080a5ad5769ead230e5ba69.tar.lz
nixpkgs-8e686bacc4e627da1080a5ad5769ead230e5ba69.tar.xz
nixpkgs-8e686bacc4e627da1080a5ad5769ead230e5ba69.tar.zst
nixpkgs-8e686bacc4e627da1080a5ad5769ead230e5ba69.zip
ocamlPackages.ocaml-r: init at 0.2.0
Diffstat (limited to 'pkgs/development/ocaml-modules/ocaml-r')
-rw-r--r--pkgs/development/ocaml-modules/ocaml-r/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/ocaml-r/default.nix b/pkgs/development/ocaml-modules/ocaml-r/default.nix
new file mode 100644
index 00000000000..71e77b24ce4
--- /dev/null
+++ b/pkgs/development/ocaml-modules/ocaml-r/default.nix
@@ -0,0 +1,31 @@
+{ lib, fetchFromGitHub, buildDunePackage, pkg-config, configurator, stdio, R }:
+
+buildDunePackage rec {
+  pname = "ocaml-r";
+  version = "0.2.0";
+
+  src = fetchFromGitHub {
+    owner = "pveber";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "09gljccwjsw9693m1hm9hcyvgp3p2fvg3cfn18yyidpc2f81a4fy";
+  };
+
+  # 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'
+  '';
+
+  buildInputs = [ configurator pkg-config R stdio ];
+
+  meta = {
+    description = "OCaml bindings for the R interpreter";
+    inherit (src.meta) homepage;
+    license = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.bcdarwin ];
+  };
+
+}