rPackages.rextendr: fix missing cargo (#430012)

This commit is contained in:
Justin Bedő 2025-08-09 08:57:19 +10:00 committed by GitHub
commit e9afcce14b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2200,6 +2200,17 @@ let
LIBAPPARMOR_HOME = pkgs.libapparmor;
});
# Append cargo path to path variable
# This will provide cargo in case it's not set by the user
rextendr = old.rextendr.overrideAttrs (attrs: {
postPatch = ''
substituteInPlace R/zzz.R --replace-fail \
".onLoad <- function(...) {" \
'.onLoad <- function(...) {
Sys.setenv(PATH = paste0(Sys.getenv("PATH"), ":${lib.getBin pkgs.cargo}/bin"))'
'';
});
RMySQL = old.RMySQL.overrideAttrs (attrs: {
MYSQL_DIR = "${pkgs.libmysqlclient}";
PKGCONFIG_CFLAGS = "-I${pkgs.libmysqlclient.dev}/include/mysql";