summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Bedő <cu@cua0.org>2024-04-19 08:29:37 +1000
committerGitHub <noreply@github.com>2024-04-19 08:29:37 +1000
commit7a7403ae31e15c66c2edcac8a76bad207a8649a3 (patch)
treef0121383d016417776c38b2dd343f2af1d744dff
parente8ef2cee84042f4afad919eee1680a0ca5194bee (diff)
parent470a49066c264cd50f197b9817b7101817905205 (diff)
Merge pull request #294933 from philipp-baumann/fix2_rPackages.arrow_14.0.0.2
rPackages.arrow: match arrow-cpp source state and fix build for darwin
-rw-r--r--pkgs/development/r-modules/default.nix29
1 files changed, 22 insertions, 7 deletions
diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix
index e2b2e7feea00..80425272c0ee 100644
--- a/pkgs/development/r-modules/default.nix
+++ b/pkgs/development/r-modules/default.nix
@@ -313,9 +313,9 @@ let
packagesWithNativeBuildInputs = {
adbcpostgresql = [ pkgs.postgresql ];
- arrow = [ pkgs.pkg-config pkgs.arrow-cpp ];
adimpro = [ pkgs.imagemagick ];
animation = [ pkgs.which ];
+ arrow = with pkgs; [ pkg-config cmake ] ++ lib.optionals stdenv.isDarwin [ intltool ];
audio = [ pkgs.portaudio ];
BayesSAE = [ pkgs.gsl ];
BayesVarSel = [ pkgs.gsl ];
@@ -1017,6 +1017,27 @@ let
];
otherOverrides = old: new: {
+ # it can happen that the major version of arrow-cpp is ahead of the
+ # rPackages.arrow that would be built from CRAN sources; therefore, to avoid
+ # build failures and manual updates of the hash, we use the R source at
+ # the GitHub release state of libarrow (arrow-cpp) in Nixpkgs. This may
+ # not exactly represent the CRAN sources, but because patching of the
+ # CRAN R package is mostly done to meet special CRAN build requirements,
+ # this is a straightforward approach. Example where patching was necessary
+ # -> arrow 14.0.0.2 on CRAN; was lagging behind libarrow release:
+ # https://github.com/apache/arrow/issues/39698 )
+ arrow = old.arrow.overrideAttrs (attrs: {
+ src = pkgs.arrow-cpp.src;
+ name = "r-arrow-${pkgs.arrow-cpp.version}";
+ prePatch = "cd r";
+ postPatch = ''
+ patchShebangs configure
+ '';
+ buildInputs = attrs.buildInputs ++ [
+ pkgs.arrow-cpp
+ ];
+ });
+
gifski = old.gifski.overrideAttrs (attrs: {
cargoDeps = pkgs.rustPlatform.fetchCargoTarball {
src = attrs.src;
@@ -1476,12 +1497,6 @@ let
'';
});
- arrow = old.arrow.overrideAttrs (attrs: {
- preConfigure = ''
- patchShebangs configure
- '';
- });
-
ROracle = old.ROracle.overrideAttrs (attrs: {
configureFlags = [
"--with-oci-lib=${pkgs.oracle-instantclient.lib}/lib"