From 5d2c1a9655ab765314e35a05d423cbac49743b9e Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 11 Oct 2024 11:23:26 +0200 Subject: [PATCH] catboost: format --- pkgs/by-name/ca/catboost/package.nix | 101 ++++++++++++++++----------- 1 file changed, 60 insertions(+), 41 deletions(-) diff --git a/pkgs/by-name/ca/catboost/package.nix b/pkgs/by-name/ca/catboost/package.nix index ca0d22ff002c..1c36c6de4a83 100644 --- a/pkgs/by-name/ca/catboost/package.nix +++ b/pkgs/by-name/ca/catboost/package.nix @@ -1,20 +1,21 @@ -{ lib -, config -, fetchFromGitHub -, cmake -, cctools -, libiconv -, llvmPackages -, ninja -, openssl -, python3Packages -, ragel -, yasm -, zlib -, cudaSupport ? config.cudaSupport -, cudaPackages ? {} -, llvmPackages_12 -, pythonSupport ? false +{ + lib, + config, + fetchFromGitHub, + cmake, + cctools, + libiconv, + llvmPackages, + ninja, + openssl, + python3Packages, + ragel, + yasm, + zlib, + cudaSupport ? config.cudaSupport, + cudaPackages ? { }, + llvmPackages_12, + pythonSupport ? false, }: let inherit (llvmPackages) stdenv; @@ -50,31 +51,46 @@ stdenv.mkDerivation (finalAttrs: { done ''; - outputs = [ "out" "dev" ]; + outputs = [ + "out" + "dev" + ]; - nativeBuildInputs = [ - cmake - llvmPackages.bintools - ninja - (python3Packages.python.withPackages (ps: with ps; [ six ])) - ragel - yasm - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - cctools - ] ++ lib.optionals cudaSupport (with cudaPackages; [ - cuda_nvcc - ]); + nativeBuildInputs = + [ + cmake + llvmPackages.bintools + ninja + (python3Packages.python.withPackages (ps: with ps; [ six ])) + ragel + yasm + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + cctools + ] + ++ lib.optionals cudaSupport ( + with cudaPackages; + [ + cuda_nvcc + ] + ); - buildInputs = [ - openssl - zlib - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - libiconv - ] ++ lib.optionals cudaSupport (with cudaPackages; [ - cuda_cudart - cuda_cccl - libcublas - ]); + buildInputs = + [ + openssl + zlib + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + libiconv + ] + ++ lib.optionals cudaSupport ( + with cudaPackages; + [ + cuda_cudart + cuda_cccl + libcublas + ] + ); env = { # catboost requires clang 14+ for build, but does clang 12 for cuda build. @@ -115,7 +131,10 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.asl20; platforms = platforms.unix; homepage = "https://catboost.ai"; - maintainers = with maintainers; [ PlushBeaver natsukium ]; + maintainers = with maintainers; [ + PlushBeaver + natsukium + ]; mainProgram = "catboost"; }; })