2023-05-07 17:10:02 +03:00
|
|
|
{
|
2023-05-21 21:35:14 +03:00
|
|
|
description = "GPT4ALL flake";
|
2023-05-07 17:10:02 +03:00
|
|
|
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2023-05-14 00:52:04 +03:00
|
|
|
inputs.gpt4all = {
|
|
|
|
url = "https://github.com/nomic-ai/gpt4all";
|
2023-05-07 17:10:02 +03:00
|
|
|
flake = false;
|
|
|
|
submodules = true;
|
|
|
|
type = "git";
|
|
|
|
};
|
|
|
|
|
2023-05-14 00:52:04 +03:00
|
|
|
outputs = { self, nixpkgs, gpt4all }:
|
2023-05-07 17:10:02 +03:00
|
|
|
let
|
|
|
|
system = "x86_64-linux";
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
packages.${system} = {
|
2024-02-02 01:30:49 +03:00
|
|
|
gpt4all-chat-2_6_2 =
|
2023-12-29 16:55:04 +03:00
|
|
|
let
|
2024-02-02 01:30:49 +03:00
|
|
|
version = "2.6.2";
|
2023-12-29 16:55:04 +03:00
|
|
|
in
|
|
|
|
pkgs.qt6Packages.callPackage ./gpt4all-chat.nix {
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "nomic-ai";
|
|
|
|
repo = "gpt4all";
|
|
|
|
rev = "v${version}";
|
|
|
|
fetchSubmodules = true;
|
2024-02-02 01:30:49 +03:00
|
|
|
sha256 = "sha256-BQE4UQEOOUAh0uGwQf7Q9D30s+aoGFyyMH6EI/WVIkc=";
|
2023-12-29 16:55:04 +03:00
|
|
|
};
|
|
|
|
inherit version;
|
|
|
|
};
|
2024-02-02 01:30:49 +03:00
|
|
|
gpt4all-chat-avx-2_6_2 = self.packages.${system}.gpt4all-chat-2_6_2.override { withAvx2 = false; };
|
2023-12-29 16:55:04 +03:00
|
|
|
gpt4all-chat-nightly = pkgs.qt6Packages.callPackage ./gpt4all-chat.nix { src=gpt4all; };
|
|
|
|
gpt4all-chat-avx-nightly = self.packages.${system}.gpt4all-chat-nightly.override { withAvx2 = false; };
|
2024-02-02 01:30:49 +03:00
|
|
|
gpt4all-chat = self.packages.${system}.gpt4all-chat-2_6_2;
|
|
|
|
gpt4all-chat-avx = self.packages.${system}.gpt4all-chat-avx-2_6_2;
|
2023-05-07 17:10:02 +03:00
|
|
|
default = self.packages.${system}.gpt4all-chat;
|
|
|
|
};
|
2023-05-07 17:14:41 +03:00
|
|
|
|
2023-05-16 20:41:17 +03:00
|
|
|
apps.${system} = {
|
|
|
|
gpt4all-chat-avx = {
|
|
|
|
type = "app";
|
|
|
|
program = "${self.packages.${system}.gpt4all-chat-avx}/bin/chat";
|
|
|
|
};
|
2023-05-16 20:39:49 +03:00
|
|
|
|
2023-05-16 20:41:17 +03:00
|
|
|
default = {
|
|
|
|
type = "app";
|
|
|
|
program = "${self.packages.${system}.gpt4all-chat}/bin/chat";
|
|
|
|
};
|
2023-05-07 17:14:41 +03:00
|
|
|
};
|
2023-05-07 17:10:02 +03:00
|
|
|
};
|
|
|
|
}
|