i have to commit in order to get the patches to work

This commit is contained in:
2026-04-05 18:08:32 -04:00
parent 00ebec0062
commit 77c77a298b
7 changed files with 331 additions and 22 deletions

View File

@@ -22,6 +22,44 @@
nixpkgs.config.packageOverrides = pkgs: {
logseq-override =
(pkgs.logseq.override {
}).overrideAttrs
(oldAttrs: rec {
version = "e8bddda236c93a86167e0b619c048588c501a708";
src = pkgs.fetchFromGitHub {
owner = "logseq";
repo = "logseq";
rev = "${version}";
hash = "sha256-URmkx8LPD9sfp/qjbyP5TsXSpnZsfCz8ra44CKVPmnE=";
};
patches = [
(pkgs.replaceVars ./overrides/logseq/hardcode-git-paths.patch {
cljs_time_src = pkgs.fetchFromGitHub {
owner = "logseq";
repo = "cljs-time";
rev = "5704fbf48d3478eedcf24d458c8964b3c2fd59a9";
hash = "sha256-IApL+SEm7AhbTN7J/1KiAKTx7rd53hchRh3jmPQ412g=";
};
bb_tasks_src = pkgs.fetchFromGitHub {
owner = "logseq";
repo = "bb-tasks";
rev = "70d3edeb287f5cec7192e642549a401f7d6d4263";
hash = "sha256-xVJj5XCkqfaNjnhYZkuqTSJN0ry8UVMaN44r9pxggB0=";
};
})
./overrides/logseq/electron-forge-package-instead-of-make.patch
./overrides/logseq/electron-forge-disable-signing.patch
# bumps better-sqlite3 to work with electron 39+
# also fixes outdated yarn.lock
./overrides/logseq/bump-better-sqlite3.patch
];
});
# Stolen from https://www.nijho.lt/post/llama-nixos/
llama-cpp =
(pkgs.llama-cpp.override {
@@ -33,13 +71,13 @@
blasSupport = true;
}).overrideAttrs
(oldAttrs: rec {
version = "8209";
version = "8660";
src = pkgs.fetchFromGitHub {
owner = "ggml-org";
repo = "llama.cpp";
tag = "b${version}";
# rev = "6ebf2e0d00d31acfc1a1fa9662e9a7d38bd07bf7"; # https://github.com/ggml-org/llama.cpp/pull/19970
hash = "sha256-7z9mQZ/hgNS+doLCVPtax+FBhr6dEfmR9wZJTwtl/pM=";
hash = "sha256-4QwFMHpaYeD+aul/p5XFBRYivJ6WgI1kxecbrqFml6o=";
leaveDotGit = true;
postFetch = ''
git -C "$out" rev-parse --short HEAD > $out/COMMIT
@@ -47,7 +85,7 @@
'';
};
# Must update npm deps hash to match the new version's webui dependencies
npmDepsHash = "sha256-FKjoZTKm0ddoVdpxzYrRUmTiuafEfbKc4UD2fz2fb8A=";
npmDepsHash = "sha256-DxgUDVr+kwtW55C4b89Pl+j3u2ILmACcQOvOBjKWAKQ=";
# Enable native CPU optimizations for massively better CPU performance
# This enables AVX, AVX2, AVX-512, FMA, etc. for your specific CPU
# NOTE: This is intentionally opposite of nixpkgs (which uses -DGGML_NATIVE=off
@@ -80,6 +118,8 @@
"-DGGML_BLAS=ON" # Uses internal BLAS provided by Nix (blasSupport=true works)
];
postPatch = "";
# Disable Nix's NIX_ENFORCE_NO_NATIVE which strips -march=native flags
# See: https://github.com/NixOS/nixpkgs/issues/357736
# See: https://github.com/NixOS/nixpkgs/pull/377484 (intentionally contradicts this)
@@ -230,6 +270,7 @@
android-tools
jq
nasctui
logseq-override
];
services.usbmuxd = {