mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 13:00:23 +00:00
gpt4all{,-cuda}: drop (#563169)
This commit is contained in:
@@ -1,53 +0,0 @@
|
||||
commit 425b33877c819dd88f3692aae37452c767371f6b
|
||||
Author: Simon Gardling <titaniumtown@proton.me>
|
||||
Date: Thu Sep 19 10:00:39 2024 -0400
|
||||
|
||||
use locally downloaded embeddings
|
||||
|
||||
diff --git a/gpt4all-chat/CMakeLists.txt b/gpt4all-chat/CMakeLists.txt
|
||||
index 900307ae..802fc31a 100644
|
||||
--- a//CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -120,6 +120,7 @@ elseif (APPLE)
|
||||
endif()
|
||||
|
||||
# Embedding model
|
||||
+#[[
|
||||
set(LOCAL_EMBEDDING_MODEL "nomic-embed-text-v1.5.f16.gguf")
|
||||
set(LOCAL_EMBEDDING_MODEL_MD5 "a5401e7f7e46ed9fcaed5b60a281d547")
|
||||
set(LOCAL_EMBEDDING_MODEL_PATH "${CMAKE_BINARY_DIR}/resources/${LOCAL_EMBEDDING_MODEL}")
|
||||
@@ -134,6 +135,7 @@ message(STATUS "Embedding model downloaded to ${LOCAL_EMBEDDING_MODEL_PATH}")
|
||||
if (APPLE)
|
||||
list(APPEND CHAT_EXE_RESOURCES "${LOCAL_EMBEDDING_MODEL_PATH}")
|
||||
endif()
|
||||
+]]
|
||||
|
||||
set(QAPPLICATION_CLASS QGuiApplication)
|
||||
add_subdirectory(deps/SingleApplication)
|
||||
@@ -348,11 +350,13 @@ if (LLMODEL_CUDA)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
+#[[
|
||||
if (NOT APPLE)
|
||||
install(FILES "${LOCAL_EMBEDDING_MODEL_PATH}"
|
||||
DESTINATION resources
|
||||
COMPONENT ${COMPONENT_NAME_MAIN})
|
||||
endif()
|
||||
+]]
|
||||
|
||||
set(CPACK_GENERATOR "IFW")
|
||||
set(CPACK_VERBATIM_VARIABLES YES)
|
||||
diff --git a/gpt4all-chat/src/embllm.cpp b/gpt4all-chat/src/embllm.cpp
|
||||
index 81b1e9e1..e3266cc7 100644
|
||||
--- a/src/embllm.cpp
|
||||
+++ b/src/embllm.cpp
|
||||
@@ -84,7 +84,7 @@ bool EmbeddingLLMWorker::loadModel()
|
||||
|
||||
QString filePath = embPathFmt.arg(QCoreApplication::applicationDirPath(), LOCAL_EMBEDDING_MODEL);
|
||||
if (!QFileInfo::exists(filePath)) {
|
||||
- qWarning() << "embllm WARNING: Local embedding model not found";
|
||||
+ qWarning() << "embllm WARNING: Local embedding model not found: " << filePath;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchurl,
|
||||
cmake,
|
||||
qt6,
|
||||
duckx,
|
||||
fmt,
|
||||
shaderc,
|
||||
vulkan-headers,
|
||||
wayland,
|
||||
cudaSupport ? config.cudaSupport,
|
||||
cudaPackages ? { },
|
||||
autoAddDriverRunpath,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "gpt4all";
|
||||
version = "3.10.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-OAD/uSCL/3OXmYVG+iGJK4zD2s0dDaPf59DF23AbSFU=";
|
||||
owner = "nomic-ai";
|
||||
repo = "gpt4all";
|
||||
tag = "v${finalAttrs.version}";
|
||||
};
|
||||
|
||||
embed_model = fetchurl {
|
||||
url = "https://gpt4all.io/models/gguf/nomic-embed-text-v1.5.f16.gguf";
|
||||
hash = "sha256-969vZoAvTfhu2hD+m7z8dcOVYr7Ujvas5xmiUc8cL9s=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./embedding-local.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail "duckx::duckx QXlsx" "duckx QXlsx"
|
||||
'';
|
||||
|
||||
sourceRoot = "${finalAttrs.src.name}/gpt4all-chat";
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
qt6.wrapQtAppsHook
|
||||
]
|
||||
++ lib.optionals cudaSupport [
|
||||
cudaPackages.cuda_nvcc
|
||||
autoAddDriverRunpath
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
duckx
|
||||
fmt
|
||||
qt6.qt5compat
|
||||
qt6.qtbase
|
||||
qt6.qtdeclarative
|
||||
qt6.qthttpserver
|
||||
qt6.qtsvg
|
||||
qt6.qttools
|
||||
qt6.qtwayland
|
||||
qt6.qtwebengine
|
||||
shaderc
|
||||
vulkan-headers
|
||||
wayland
|
||||
]
|
||||
++ lib.optionals cudaSupport (
|
||||
with cudaPackages;
|
||||
[
|
||||
cccl
|
||||
cuda_cudart
|
||||
libcublas
|
||||
]
|
||||
);
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "KOMPUTE_OPT_USE_BUILT_IN_VULKAN_HEADER" false)
|
||||
(lib.cmakeBool "KOMPUTE_OPT_DISABLE_VULKAN_VERSION_CHECK" true)
|
||||
(lib.cmakeBool "KOMPUTE_OPT_USE_BUILT_IN_FMT" false)
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/issues/298997
|
||||
# https://github.com/nomic-ai/gpt4all/issues/3468
|
||||
(lib.cmakeBool "LLMODEL_KOMPUTE" false)
|
||||
]
|
||||
++ lib.optionals (!cudaSupport) [
|
||||
(lib.cmakeBool "LLMODEL_CUDA" false)
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
rm -rf $out/include
|
||||
rm -rf $out/lib/*.a
|
||||
mv $out/bin/chat $out/bin/${finalAttrs.meta.mainProgram}
|
||||
install -D ${finalAttrs.embed_model} $out/resources/nomic-embed-text-v1.5.f16.gguf
|
||||
install -m 444 -D $src/gpt4all-chat/flatpak-manifest/io.gpt4all.gpt4all.desktop $out/share/applications/io.gpt4all.gpt4all.desktop
|
||||
install -m 444 -D $src/gpt4all-chat/icons/nomic_logo.svg $out/share/icons/hicolor/scalable/apps/io.gpt4all.gpt4all.svg
|
||||
substituteInPlace $out/share/applications/io.gpt4all.gpt4all.desktop \
|
||||
--replace-fail 'Exec=chat' 'Exec=${finalAttrs.meta.mainProgram}'
|
||||
'';
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/nomic-ai/gpt4all/releases/tag/v${finalAttrs.version}";
|
||||
description = "Free-to-use, locally running, privacy-aware chatbot. No GPU or internet required";
|
||||
homepage = "https://github.com/nomic-ai/gpt4all";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "gpt4all";
|
||||
maintainers = with lib.maintainers; [
|
||||
titaniumtown
|
||||
];
|
||||
};
|
||||
})
|
||||
@@ -1078,6 +1078,8 @@ mapAliases {
|
||||
gphotos-sync = throw "'gphotos-sync' has been removed, as it was archived upstream due to API changes that ceased its functions"; # Added 2025-11-06
|
||||
gprbuild-boot = throw "'gprbuild-boot' has been renamed to/replaced by 'gnatPackages.gprbuild-boot'"; # Converted to throw 2025-10-27
|
||||
gpredict-unstable = throw "'gpredict-unstable' has been removed, as it was behind 'gpredict'"; # Added 2026-04-29
|
||||
gpt4all = throw "'gpt4all' has been removed because it is broken and unmaintained upstream"; # Added 2026-09-14
|
||||
gpt4all-cuda = throw "'gpt4all-cuda' has been removed because it is broken and unmaintained upstream"; # Added 2026-09-14
|
||||
gpt-box = throw "'gpt-box' has been removed, as it is unmaintained"; # Added 2026-01-25
|
||||
gpxsee-qt5 = throw "gpxsee-qt5 was removed, use gpxsee instead"; # Added 2025-09-09
|
||||
gpxsee-qt6 = gpxsee; # Added 2025-09-09
|
||||
|
||||
@@ -2123,10 +2123,6 @@ with pkgs;
|
||||
|
||||
gdown = with python3Packages; toPythonApplication gdown;
|
||||
|
||||
gpt4all-cuda = gpt4all.override {
|
||||
cudaSupport = true;
|
||||
};
|
||||
|
||||
gprof2dot = with python3Packages; toPythonApplication gprof2dot;
|
||||
|
||||
grails = callPackage ../development/web/grails { jdk = null; };
|
||||
|
||||
Reference in New Issue
Block a user