Unverified Commit bcf738fd authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

Merge pull request #314564 from dawidd6/gpt4all

gpt4all: 2.7.5 -> 2.8.0
parents eb53d91b 4705acc5
Loading
Loading
Loading
Loading
+19 −3
Original line number Diff line number Diff line
{ lib
, config
, stdenv
, fetchFromGitHub
, cmake
@@ -7,15 +8,17 @@
, shaderc
, vulkan-headers
, wayland
, cudaSupport ? config.cudaSupport
, cudaPackages ? { }
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "gpt4all";
  version = "2.7.5";
  version = "2.8.0";

  src = fetchFromGitHub {
    fetchSubmodules = true;
    hash = "sha256-i/T6gk8ICneW624008eiStgYNv5CE8w0Yx8knk57EFw=";
    hash = "sha256-aSz37+1K26Xizf4cpV45a2DnSsl959VQok/ppFRk/hs=";
    owner = "nomic-ai";
    repo = "gpt4all";
    rev = "v${finalAttrs.version}";
@@ -26,6 +29,8 @@ stdenv.mkDerivation (finalAttrs: {
  nativeBuildInputs = [
    cmake
    qt6.wrapQtAppsHook
  ] ++ lib.optionals cudaSupport [
    cudaPackages.cuda_nvcc
  ];

  buildInputs = [
@@ -39,12 +44,23 @@ stdenv.mkDerivation (finalAttrs: {
    shaderc
    vulkan-headers
    wayland
  ];
  ] ++ lib.optionals cudaSupport (
      with cudaPackages;
      [
        cuda_cccl.dev
        cuda_cudart.dev
        cuda_cudart.lib
        cuda_cudart.static
        libcublas.dev
        libcublas.lib
      ]);

  cmakeFlags = [
    "-DKOMPUTE_OPT_USE_BUILT_IN_VULKAN_HEADER=OFF"
    "-DKOMPUTE_OPT_DISABLE_VULKAN_VERSION_CHECK=ON"
    "-DKOMPUTE_OPT_USE_BUILT_IN_FMT=OFF"
  ] ++ lib.optionals (!cudaSupport) [
    "-DLLMODEL_CUDA=OFF"
  ];

  postInstall = ''
+4 −0
Original line number Diff line number Diff line
@@ -8556,6 +8556,10 @@ with pkgs;
  gparted = callPackage ../tools/misc/gparted { };
  gpt4all-cuda = gpt4all.override {
    cudaSupport = true;
  };
  gpt2tc = callPackage ../tools/text/gpt2tc { };
  gptcommit = callPackage ../development/tools/gptcommit {