Build 2.5.4 release by default, add nightly option

Running the flake as before will now result in the latest release
being run (currently 2.5.4). To keep using the nightly (or rather,
the one from the flake lock) version, use:
* gpt4all-chat-nightly
* gpt4all-chat-avx-nighly
This commit is contained in:
polygon 2023-12-29 14:55:04 +01:00
parent 5afde27c4a
commit 47f7ae407d
2 changed files with 21 additions and 3 deletions

View File

@ -16,8 +16,25 @@
in
{
packages.${system} = {
gpt4all-chat = pkgs.qt6Packages.callPackage ./gpt4all-chat.nix { src=gpt4all; };
gpt4all-chat-avx = pkgs.qt6Packages.callPackage ./gpt4all-chat.nix { src=gpt4all; withAvx2 = false; };
gpt4all-chat-2_5_4 =
let
version = "2.5.4";
in
pkgs.qt6Packages.callPackage ./gpt4all-chat.nix {
src = pkgs.fetchFromGitHub {
owner = "nomic-ai";
repo = "gpt4all";
rev = "v${version}";
fetchSubmodules = true;
sha256 = "sha256-JZ8O9a0XRwRR81b+A97sWOtiL0M12cqLh9eoE+VkDVg=";
};
inherit version;
};
gpt4all-chat-avx-2_5_4 = self.packages.${system}.gpt4all-chat-2_5_4.override { withAvx2 = false; };
gpt4all-chat-nightly = pkgs.qt6Packages.callPackage ./gpt4all-chat.nix { src=gpt4all; };
gpt4all-chat-avx-nightly = self.packages.${system}.gpt4all-chat-nightly.override { withAvx2 = false; };
gpt4all-chat = self.packages.${system}.gpt4all-chat-2_5_4;
gpt4all-chat-avx = self.packages.${system}.gpt4all-chat-avx-2_5_4;
default = self.packages.${system}.gpt4all-chat;
};

View File

@ -13,14 +13,15 @@
, vulkan-headers
, wayland
, wrapQtAppsHook
, version ? "nightly"
, withAvx2 ? true
}:
stdenv.mkDerivation {
pname = "gpt4all-chat";
version = "nightly";
inherit src;
inherit version;
postPatch = ''
substituteInPlace CMakeLists.txt \