From 2768ac9c9f3596127d1d6f9afc460f978175fcad Mon Sep 17 00:00:00 2001 From: Igor Sharonov Date: Sat, 17 Feb 2024 14:13:59 +0300 Subject: [PATCH] xgboost: preserve cmake targets in install phase --- pkgs/development/libraries/xgboost/default.nix | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/xgboost/default.nix b/pkgs/development/libraries/xgboost/default.nix index 0af51a40dfb1..6fc76dad671c 100644 --- a/pkgs/development/libraries/xgboost/default.nix +++ b/pkgs/development/libraries/xgboost/default.nix @@ -114,21 +114,15 @@ stdenv.mkDerivation rec { let libname = "libxgboost${stdenv.hostPlatform.extensions.sharedLibrary}"; in '' runHook preInstall - mkdir -p $out - cp -r ../include $out - cp -r ../dmlc-core/include/dmlc $out/include - cp -r ../rabit/include/rabit $out/include - '' + lib.optionalString (!rLibrary) '' - install -Dm755 ../lib/${libname} $out/lib/${libname} - install -Dm755 ../xgboost $out/bin/xgboost '' # the R library option builds a completely different binary xgboost.so instead of # libxgboost.so, which isn't full featured for python and CLI + lib.optionalString rLibrary '' - mkdir $out/library + mkdir -p $out/library export R_LIBS_SITE="$out/library:$R_LIBS_SITE''${R_LIBS_SITE:+:}" - make install -l $out/library '' + '' + cmake --install . + cp -r ../rabit/include/rabit $out/include runHook postInstall '';