fix gpt4all

This commit is contained in:
2024-10-16 22:01:25 -04:00
parent fddb34888a
commit 705e31e76c
6 changed files with 34 additions and 67 deletions

View File

@@ -98,11 +98,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1729023891,
"narHash": "sha256-8NCqlnMnKldeLEWUyXG8UYbu1Wx2wctsA3+fFnMhNO4=",
"lastModified": 1729090125,
"narHash": "sha256-jZQe55BWLEv6OwItbL7mMsm8A3/1rrLk4vTm3k7+jqg=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "7084b0221f3dec7ea1f1c5203d9e389eb9908d07",
"rev": "44d93e05a400cad197fd10f9d50e9475fc519326",
"type": "github"
},
"original": {
@@ -131,11 +131,11 @@
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1728979917,
"narHash": "sha256-NWt6gwVP6072BcV2FvuZD8fikyDcT5WSBrs+6w9hTsk=",
"lastModified": 1729086716,
"narHash": "sha256-xF1AtbQ+ipQyzyXV8mWGlndbeqACM3IIadyCHO0OtpU=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "a13b9298c66f45e571533731e2a690a23534df01",
"rev": "84655d3b2627687e14431adb49450cd6af1de40f",
"type": "github"
},
"original": {

View File

@@ -11,7 +11,7 @@
./progs/alacritty.nix
# gpt4all broken https://github.com/NixOS/nixpkgs/pull/346185
# ./progs/gpt4all/gpt4all.nix
./progs/gpt4all/gpt4all.nix
];
nixpkgs.config.allowUnfreePredicate =

View File

@@ -35,6 +35,7 @@
}
))
cargo-expand
rust-script
# find typos in code
typos
@@ -117,20 +118,18 @@
nil # nix lsp
yaml-language-server # yaml lsp
marksman # markdown lsp
typescript-language-server # typescript lsp
# clang-format and clang-tidy
clang-tools
clang
lldb
fio
age
git-crypt
clang
imagemagick
];

View File

@@ -49,6 +49,8 @@ in
nix-cleanup = "doas nix-collect-garbage --delete-older-than 1d && doas nix-store --optimise && doas nix-store --gc";
gcc-native = "${pkgs.gcc}/bin/gcc -Q --help=target -mtune=native -march=native | ${pkgs.gnugrep}/bin/grep -E '(mtune|march)=' | ${pkgs.gnugrep}/bin/grep -v 'Known valid arguments' | ${pkgs.gnused}/bin/sed -E \"s/[[:space:]]+//g\"";
chess = "${pkgs.chess-tui} -e ${pkgs.stockfish}/bin/stockfish";
};
shellInit = ''

View File

@@ -29,13 +29,13 @@ let
gpt4all_package = (
optimizeWithFlags
(pkgs.gpt4all.overrideAttrs (old: {
version = "3.4.1";
version = "3.4.2";
src = pkgs.fetchFromGitHub {
fetchSubmodules = true;
owner = "nomic-ai";
repo = "gpt4all";
rev = "v3.4.1";
sha256 = "L29ZQlDDJlh538cgAGuo/ijtBQvZ0vloH4vdJ1oIe5I=";
rev = "v3.4.2";
sha256 = "QzU22y6tt3UhazVSPcFuKejH4AV+mw7JExH61NtAKoM=";
};
cmakeFlags = old.cmakeFlags ++ [
@@ -46,12 +46,18 @@ let
patches = old.patches ++ [
./disable-settings-err.patch
./disable-version-check.patch
(pkgs.fetchpatch {
url = "https://aur.archlinux.org/cgit/aur.git/plain/004-fix-build-with-qt-6.8.0.diff?h=gpt4all-chat&id=d14b12cb63fae95e578aa839a570189a23833051";
sha256 = "3Zur9KFn45f4dgAzOF7p1q42IdLqXwioN4zMiBbWbVU=";
stripLen = 1;
})
];
}))
# compile flags
[
"-Ofast"
"-O3"
"-ffast-math"
"-march=native"
"-mtune=native"
"-fno-finite-math-only" # https://github.com/ggerganov/llama.cpp/pull/7154#issuecomment-2143844461