gpt4all-nix/gpt4all-chat.nix

47 lines
813 B
Nix
Raw Normal View History

2023-05-07 17:10:02 +03:00
{ src
, lib
, stdenv
, cmake
2023-05-19 21:31:23 +03:00
, qtwayland
2023-05-07 17:10:02 +03:00
, qtquicktimeline
, qtsvg
2023-05-21 21:35:14 +03:00
, qthttpserver
2023-05-07 17:10:02 +03:00
, wrapQtAppsHook
2023-05-16 20:39:49 +03:00
, withAvx2 ? true
2023-05-07 17:10:02 +03:00
}:
stdenv.mkDerivation {
pname = "gpt4all-chat";
version = "nightly";
inherit src;
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace 'set(CMAKE_INSTALL_PREFIX ''${CMAKE_BINARY_DIR}/install)' ""
'';
nativeBuildInputs = [
wrapQtAppsHook
cmake
];
buildInputs = [
2023-05-19 21:31:23 +03:00
qtwayland
2023-05-07 17:10:02 +03:00
qtquicktimeline
qtsvg
2023-05-21 21:35:14 +03:00
qthttpserver
2023-05-07 17:10:02 +03:00
];
cmakeFlags = lib.optionals withAvx2 [ "-DGPT4ALL_AVX_ONLY=ON" ];
2023-05-16 20:39:49 +03:00
2023-05-14 00:52:04 +03:00
setSourceRoot = "sourceRoot=`pwd`/source/gpt4all-chat";
2023-05-07 17:10:02 +03:00
meta = with lib; {
description = "Gpt4all-j chat";
homepage = "https://github.com/nomic-ai/gpt4all-chat";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}