Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catboost: tweak, fix build #370663

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 22 additions & 20 deletions pkgs/by-name/ca/catboost/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
ragel,
yasm,
zlib,
gitUpdater,
cudaSupport ? config.cudaSupport,
cudaPackages ? { },
llvmPackages_12,
pythonSupport ? false,
}:
let
inherit (llvmPackages) stdenv;
stdenv = if cudaSupport then cudaPackages.backendStdenv else llvmPackages.stdenv;
in

stdenv.mkDerivation (finalAttrs: {
Expand All @@ -28,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: {
src = fetchFromGitHub {
owner = "catboost";
repo = "catboost";
rev = "refs/tags/v${finalAttrs.version}";
tag = "v${finalAttrs.version}";
hash = "sha256-I3geFdVQ1Pm61eRXi+ueaxel3QRb8EJV9f4zV2Q7kk4=";
};

Expand Down Expand Up @@ -68,12 +69,9 @@ stdenv.mkDerivation (finalAttrs: {
++ lib.optionals stdenv.hostPlatform.isDarwin [
cctools
]
++ lib.optionals cudaSupport (
with cudaPackages;
[
cuda_nvcc
]
);
++ lib.optionals cudaSupport [
cudaPackages.cuda_nvcc
];

buildInputs =
[
Expand All @@ -83,14 +81,11 @@ stdenv.mkDerivation (finalAttrs: {
++ lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
]
++ lib.optionals cudaSupport (
with cudaPackages;
[
cuda_cudart
cuda_cccl
libcublas
]
);
++ lib.optionals cudaSupport [
cudaPackages.cuda_cudart
cudaPackages.cuda_cccl
cudaPackages.libcublas
];

env = {
PROGRAM_VERSION = finalAttrs.version;
Expand All @@ -101,6 +96,11 @@ stdenv.mkDerivation (finalAttrs: {
CUDAHOSTCXX = lib.optionalString cudaSupport "${llvmPackages_12.stdenv.cc}/bin/cc";
NIX_CFLAGS_LINK = lib.optionalString stdenv.hostPlatform.isLinux "-fuse-ld=lld";
NIX_LDFLAGS = "-lc -lm";
NIX_CFLAGS_COMPILE = toString (
lib.optionals stdenv.cc.isClang [
"-Wno-error=missing-template-arg-list-after-template-kw"
]
);
};

cmakeFlags = [
Expand All @@ -123,18 +123,20 @@ stdenv.mkDerivation (finalAttrs: {
runHook postInstall
'';

meta = with lib; {
passthru.updateScript = gitUpdater { rev-prefix = "v"; };

meta = {
description = "High-performance library for gradient boosting on decision trees";
longDescription = ''
A fast, scalable, high performance Gradient Boosting on Decision Trees
library, used for ranking, classification, regression and other machine
learning tasks for Python, R, Java, C++. Supports computation on CPU and GPU.
'';
changelog = "https://github.com/catboost/catboost/releases/tag/v${finalAttrs.version}";
license = licenses.asl20;
platforms = platforms.unix;
license = lib.licenses.asl20;
platforms = lib.platforms.unix;
homepage = "https://catboost.ai";
maintainers = with maintainers; [
maintainers = with lib.maintainers; [
PlushBeaver
natsukium
];
Expand Down
Loading