1
0
forked from nikkuss/pkgs

4 Commits

Author SHA1 Message Date
doloro 0188aff399 fix: it builds now 2026-04-21 23:10:14 +01:00
doloro 34974204db wip: llama-cpp with hexagon 2026-04-21 17:38:09 +01:00
doloro 1228969d80 renamed: llama-cpp-hexagon -> llama-cpp 2026-04-20 20:37:53 +01:00
doloro d462837a55 added: llama-cpp 2026-04-20 20:37:29 +01:00
9 changed files with 304 additions and 80 deletions
-3
View File
@@ -1,6 +1,3 @@
/result /result
**/result **/result
result result
.envrc
.direnv
+24 -24
View File
@@ -1,7 +1,7 @@
{ {
"ath-tools": { "ath-tools": {
"cargoLock": null, "cargoLock": null,
"date": "2026-04-15", "date": "2026-03-03",
"extract": null, "extract": null,
"name": "ath-tools", "name": "ath-tools",
"passthru": null, "passthru": null,
@@ -11,17 +11,17 @@
"fetchSubmodules": false, "fetchSubmodules": false,
"leaveDotGit": false, "leaveDotGit": false,
"name": null, "name": null,
"rev": "324903e86fbd30d601f404125da74b28d812be4b", "rev": "c8182015b0ec81da1d4c39841aca190deae77c2c",
"sha256": "sha256-Gykx/uHPzbHPECtiCoRmo9YWxUpYc7Ky1lNBENLsRm4=", "sha256": "sha256-Va845WLEyB+l7cpLIvYpvwOyMZuLKcb3Afqqs/cUSmI=",
"sparseCheckout": [], "sparseCheckout": [],
"type": "git", "type": "git",
"url": "https://github.com/qca/qca-swiss-army-knife.git" "url": "https://github.com/qca/qca-swiss-army-knife.git"
}, },
"version": "324903e86fbd30d601f404125da74b28d812be4b" "version": "c8182015b0ec81da1d4c39841aca190deae77c2c"
}, },
"base24-schemes": { "base24-schemes": {
"cargoLock": null, "cargoLock": null,
"date": "2026-05-03", "date": "2026-04-12",
"extract": null, "extract": null,
"name": "base24-schemes", "name": "base24-schemes",
"passthru": null, "passthru": null,
@@ -31,13 +31,13 @@
"fetchSubmodules": false, "fetchSubmodules": false,
"leaveDotGit": false, "leaveDotGit": false,
"name": null, "name": null,
"rev": "0c94645546f4f3ddac77a1a5fce54eb95bf50795", "rev": "3e228732e93c107e8b65b8be30c36e5b3c507d95",
"sha256": "sha256-PDF0/wObw4nIsSBeXVYLsloXOiphXCgIdsrNcVXguKs=", "sha256": "sha256-G34G4hri8H2XNwF0e15MFj3sjO8fTOphNk0WjBwnVew=",
"sparseCheckout": [], "sparseCheckout": [],
"type": "git", "type": "git",
"url": "https://github.com/tinted-theming/schemes.git" "url": "https://github.com/tinted-theming/schemes.git"
}, },
"version": "0c94645546f4f3ddac77a1a5fce54eb95bf50795" "version": "3e228732e93c107e8b65b8be30c36e5b3c507d95"
}, },
"claude-code-acp": { "claude-code-acp": {
"cargoLock": null, "cargoLock": null,
@@ -53,12 +53,12 @@
"name": null, "name": null,
"owner": "zed-industries", "owner": "zed-industries",
"repo": "claude-code-acp", "repo": "claude-code-acp",
"rev": "v0.35.0", "rev": "v0.26.0",
"sha256": "sha256-xb6D4J+EmbK5XCrZCyv1LWYdfmaNDcw7Hk4nHg76uAo=", "sha256": "sha256-2G8gjMCnk3W1I2+4sNsumL15ts9bLXAOMguCmwnzWSA=",
"sparseCheckout": [], "sparseCheckout": [],
"type": "github" "type": "github"
}, },
"version": "v0.35.0" "version": "v0.26.0"
}, },
"flightcore": { "flightcore": {
"cargoLock": null, "cargoLock": null,
@@ -84,27 +84,27 @@
"neovide": { "neovide": {
"cargoLock": { "cargoLock": {
"Cargo.lock": [ "Cargo.lock": [
"sha256-Ke8bM5o33s1h1fHY7Y10fYKpVwS3_pU7iOBpBOC0Dvw=/Cargo.lock", "sha256-JBV939TEfG44w59iUJ3KgiCrQ9aCcjmPxu2uoBD_Ank=/Cargo.lock",
{} {}
] ]
}, },
"date": "2026-05-16", "date": null,
"extract": null, "extract": null,
"name": "neovide", "name": "neovide",
"passthru": null, "passthru": null,
"pinned": false, "pinned": false,
"src": { "src": {
"deepClone": false, "deepClone": true,
"fetchSubmodules": false, "fetchSubmodules": true,
"leaveDotGit": false, "leaveDotGit": false,
"name": null, "name": null,
"rev": "8c48a699e201aa5559227a96d879b2f57192b354", "rev": "nightly",
"sha256": "sha256-Ke8bM5o33s1h1fHY7Y10fYKpVwS3/pU7iOBpBOC0Dvw=", "sha256": "sha256-JBV939TEfG44w59iUJ3KgiCrQ9aCcjmPxu2uoBD/Ank=",
"sparseCheckout": [], "sparseCheckout": [],
"type": "git", "type": "git",
"url": "https://github.com/neovide/neovide.git" "url": "https://github.com/neovide/neovide.git"
}, },
"version": "8c48a699e201aa5559227a96d879b2f57192b354" "version": "nightly"
}, },
"qebspil": { "qebspil": {
"cargoLock": null, "cargoLock": null,
@@ -140,12 +140,12 @@
"name": null, "name": null,
"owner": "radareorg", "owner": "radareorg",
"repo": "r2ghidra", "repo": "r2ghidra",
"rev": "6.1.4", "rev": "6.1.2",
"sha256": "sha256-uVMsONXethTq/BL9MBQkDP3iJ6t25PEnpeD/Y17dpxM=", "sha256": "sha256-bGA7izBSvlwnD4BZXNucYS39BDdmo+49cY3o4LjIpYM=",
"sparseCheckout": [], "sparseCheckout": [],
"type": "github" "type": "github"
}, },
"version": "6.1.4" "version": "6.1.2"
}, },
"radare2-mcp": { "radare2-mcp": {
"cargoLock": null, "cargoLock": null,
@@ -161,12 +161,12 @@
"name": null, "name": null,
"owner": "radareorg", "owner": "radareorg",
"repo": "radare2-mcp", "repo": "radare2-mcp",
"rev": "1.8.0", "rev": "1.7.2",
"sha256": "sha256-1tV3mG1hEIcq18cHn5kS4n9ocVZsHQ5A4TCTA3OKzn8=", "sha256": "sha256-ToSvRmgOyrmsFWjfwuDit5hLXYJQD7YKGoy2utkqUe0=",
"sparseCheckout": [], "sparseCheckout": [],
"type": "github" "type": "github"
}, },
"version": "1.8.0" "version": "1.7.2"
}, },
"slbounce": { "slbounce": {
"cargoLock": null, "cargoLock": null,
+24 -27
View File
@@ -4,45 +4,44 @@
fetchurl, fetchurl,
fetchFromGitHub, fetchFromGitHub,
dockerTools, dockerTools,
}: }: {
{
ath-tools = { ath-tools = {
pname = "ath-tools"; pname = "ath-tools";
version = "324903e86fbd30d601f404125da74b28d812be4b"; version = "c8182015b0ec81da1d4c39841aca190deae77c2c";
src = fetchgit { src = fetchgit {
url = "https://github.com/qca/qca-swiss-army-knife.git"; url = "https://github.com/qca/qca-swiss-army-knife.git";
rev = "324903e86fbd30d601f404125da74b28d812be4b"; rev = "c8182015b0ec81da1d4c39841aca190deae77c2c";
fetchSubmodules = false; fetchSubmodules = false;
deepClone = false; deepClone = false;
leaveDotGit = false; leaveDotGit = false;
sparseCheckout = []; sparseCheckout = [];
sha256 = "sha256-Gykx/uHPzbHPECtiCoRmo9YWxUpYc7Ky1lNBENLsRm4="; sha256 = "sha256-Va845WLEyB+l7cpLIvYpvwOyMZuLKcb3Afqqs/cUSmI=";
}; };
date = "2026-04-15"; date = "2026-03-03";
}; };
base24-schemes = { base24-schemes = {
pname = "base24-schemes"; pname = "base24-schemes";
version = "0c94645546f4f3ddac77a1a5fce54eb95bf50795"; version = "3e228732e93c107e8b65b8be30c36e5b3c507d95";
src = fetchgit { src = fetchgit {
url = "https://github.com/tinted-theming/schemes.git"; url = "https://github.com/tinted-theming/schemes.git";
rev = "0c94645546f4f3ddac77a1a5fce54eb95bf50795"; rev = "3e228732e93c107e8b65b8be30c36e5b3c507d95";
fetchSubmodules = false; fetchSubmodules = false;
deepClone = false; deepClone = false;
leaveDotGit = false; leaveDotGit = false;
sparseCheckout = []; sparseCheckout = [];
sha256 = "sha256-PDF0/wObw4nIsSBeXVYLsloXOiphXCgIdsrNcVXguKs="; sha256 = "sha256-G34G4hri8H2XNwF0e15MFj3sjO8fTOphNk0WjBwnVew=";
}; };
date = "2026-05-03"; date = "2026-04-12";
}; };
claude-code-acp = { claude-code-acp = {
pname = "claude-code-acp"; pname = "claude-code-acp";
version = "v0.35.0"; version = "v0.26.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "zed-industries"; owner = "zed-industries";
repo = "claude-code-acp"; repo = "claude-code-acp";
rev = "v0.35.0"; rev = "v0.26.0";
fetchSubmodules = false; fetchSubmodules = false;
sha256 = "sha256-xb6D4J+EmbK5XCrZCyv1LWYdfmaNDcw7Hk4nHg76uAo="; sha256 = "sha256-2G8gjMCnk3W1I2+4sNsumL15ts9bLXAOMguCmwnzWSA=";
}; };
}; };
flightcore = { flightcore = {
@@ -58,23 +57,21 @@
}; };
neovide = { neovide = {
pname = "neovide"; pname = "neovide";
version = "8c48a699e201aa5559227a96d879b2f57192b354"; version = "nightly";
src = fetchgit { src = fetchgit {
url = "https://github.com/neovide/neovide.git"; url = "https://github.com/neovide/neovide.git";
rev = "8c48a699e201aa5559227a96d879b2f57192b354"; rev = "nightly";
fetchSubmodules = false; fetchSubmodules = true;
deepClone = false; deepClone = true;
leaveDotGit = false; leaveDotGit = false;
sparseCheckout = []; sparseCheckout = [];
sha256 = "sha256-Ke8bM5o33s1h1fHY7Y10fYKpVwS3/pU7iOBpBOC0Dvw="; sha256 = "sha256-JBV939TEfG44w59iUJ3KgiCrQ9aCcjmPxu2uoBD/Ank=";
}; };
cargoLock."Cargo.lock" = { cargoLock."Cargo.lock" = {
lockFile = ./. + "/sha256-Ke8bM5o33s1h1fHY7Y10fYKpVwS3_pU7iOBpBOC0Dvw=/Cargo.lock"; lockFile = ./. + "/sha256-JBV939TEfG44w59iUJ3KgiCrQ9aCcjmPxu2uoBD_Ank=/Cargo.lock";
outputHashes = { outputHashes = {
}; };
}; };
date = "2026-05-16";
}; };
qebspil = { qebspil = {
pname = "qebspil"; pname = "qebspil";
@@ -92,24 +89,24 @@
}; };
radare2-ghidra = { radare2-ghidra = {
pname = "radare2-ghidra"; pname = "radare2-ghidra";
version = "6.1.4"; version = "6.1.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "radareorg"; owner = "radareorg";
repo = "r2ghidra"; repo = "r2ghidra";
rev = "6.1.4"; rev = "6.1.2";
fetchSubmodules = false; fetchSubmodules = false;
sha256 = "sha256-uVMsONXethTq/BL9MBQkDP3iJ6t25PEnpeD/Y17dpxM="; sha256 = "sha256-bGA7izBSvlwnD4BZXNucYS39BDdmo+49cY3o4LjIpYM=";
}; };
}; };
radare2-mcp = { radare2-mcp = {
pname = "radare2-mcp"; pname = "radare2-mcp";
version = "1.8.0"; version = "1.7.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "radareorg"; owner = "radareorg";
repo = "radare2-mcp"; repo = "radare2-mcp";
rev = "1.8.0"; rev = "1.7.2";
fetchSubmodules = false; fetchSubmodules = false;
sha256 = "sha256-1tV3mG1hEIcq18cHn5kS4n9ocVZsHQ5A4TCTA3OKzn8="; sha256 = "sha256-ToSvRmgOyrmsFWjfwuDit5hLXYJQD7YKGoy2utkqUe0=";
}; };
}; };
slbounce = { slbounce = {
@@ -1593,7 +1593,7 @@ dependencies = [
[[package]] [[package]]
name = "neovide" name = "neovide"
version = "0.16.2" version = "0.16.1"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"approx", "approx",
@@ -2579,9 +2579,9 @@ dependencies = [
[[package]] [[package]]
name = "regex" name = "regex"
version = "1.12.3" version = "1.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4"
dependencies = [ dependencies = [
"aho-corasick", "aho-corasick",
"memchr", "memchr",
@@ -2849,9 +2849,9 @@ checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d"
[[package]] [[package]]
name = "skia-bindings" name = "skia-bindings"
version = "0.97.0" version = "0.93.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6e3bcf8f25bf047e83110838463e8d06696c12fccc3d3794adf448b4d81f34b" checksum = "2359f7e30c9da3f322f8ca3d4ec0abbc12a40035ce758309db0cdab07b5d4476"
dependencies = [ dependencies = [
"bindgen", "bindgen",
"cc", "cc",
@@ -2866,9 +2866,9 @@ dependencies = [
[[package]] [[package]]
name = "skia-safe" name = "skia-safe"
version = "0.97.0" version = "0.93.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "935d4d174fb749bac9265eb41cad75039d32fda2d9c1a1e81b430df0e210a409" checksum = "7f9e837ea9d531c9efee8f980bfcdb7226b21db0285b0c3171d8be745829f940"
dependencies = [ dependencies = [
"bitflags 2.10.0", "bitflags 2.10.0",
"skia-bindings", "skia-bindings",
@@ -3051,9 +3051,9 @@ dependencies = [
[[package]] [[package]]
name = "tar" name = "tar"
version = "0.4.45" version = "0.4.44"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22692a6476a21fa75fdfc11d452fda482af402c008cdbaf3476414e122040973" checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a"
dependencies = [ dependencies = [
"filetime", "filetime",
"libc", "libc",
@@ -3070,7 +3070,7 @@ dependencies = [
"getrandom 0.3.4", "getrandom 0.3.4",
"once_cell", "once_cell",
"rustix 1.1.2", "rustix 1.1.2",
"windows-sys 0.52.0", "windows-sys 0.61.2",
] ]
[[package]] [[package]]
@@ -3341,9 +3341,9 @@ dependencies = [
[[package]] [[package]]
name = "tracy-client-sys" name = "tracy-client-sys"
version = "0.28.0" version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c5f7c95348f20c1c913d72157b3c6dee6ea3e30b3d19502c5a7f6d3f160dacbf" checksum = "2fb391ac70462b3097a755618fbf9c8f95ecc1eb379a414f7b46f202ed10db1f"
dependencies = [ dependencies = [
"cc", "cc",
"windows-targets 0.52.6", "windows-targets 0.52.6",
@@ -3689,7 +3689,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [ dependencies = [
"windows-sys 0.52.0", "windows-sys 0.61.2",
] ]
[[package]] [[package]]
+3 -2
View File
@@ -32,7 +32,8 @@ src.git = "https://github.com/qca/qca-swiss-army-knife.git"
fetch.git = "https://github.com/qca/qca-swiss-army-knife.git" fetch.git = "https://github.com/qca/qca-swiss-army-knife.git"
[neovide] [neovide]
src.git = "https://github.com/neovide/neovide.git" src.manual = "nightly"
src.git_branch = "nightly"
fetch.git = "https://github.com/neovide/neovide.git" fetch.git = "https://github.com/neovide/neovide.git"
git.fetchSubmodules = true
git.deepClone = true
cargo_lock = ["Cargo.lock"] cargo_lock = ["Cargo.lock"]
@@ -0,0 +1,6 @@
{ llama-cpp }:
llama-cpp.override {
hexagonSupport = true;
blasSupport = false;
}
+223
View File
@@ -0,0 +1,223 @@
{
lib,
pkgs,
autoAddDriverRunpath,
cmake,
fetchFromGitHub,
nix-update-script,
stdenv,
config,
cudaSupport ? config.cudaSupport,
cudaPackages ? { },
rocmSupport ? config.rocmSupport,
rocmPackages ? { },
rocmGpuTargets ? rocmPackages.clr.localGpuTargets or rocmPackages.clr.gpuTargets,
openclSupport ? false,
clblast,
blasSupport ? builtins.all (x: !x) [
cudaSupport
metalSupport
openclSupport
rocmSupport
vulkanSupport
],
blas,
pkg-config,
metalSupport ? stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 && !openclSupport,
vulkanSupport ? false,
rpcSupport ? false,
hexagonSupport ? false,
curl,
llama-cpp,
shaderc,
vulkan-headers,
hexagon-sdk,
vulkan-loader,
ninja,
}:
let
# It's necessary to consistently use backendStdenv when building with CUDA support,
# otherwise we get libstdc++ errors downstream.
# cuda imposes an upper bound on the gcc version
buildPkgs = import pkgs.path {
system = "x86_64-linux"; # builder uses x86_64
};
# hexagon needs a x86 build env
crossPkgs = buildPkgs.pkgsCross.aarch64-multiplatform;
effectiveStdenv = if hexagonSupport then crossPkgs.stdenv else stdenv;
inherit (lib)
cmakeBool
cmakeFeature
optionals
optionalString
;
cudaBuildInputs = with cudaPackages; [
cuda_cccl # <nv/target>
# A temporary hack for reducing the closure size, remove once cudaPackages
# have stopped using lndir: https://github.com/NixOS/nixpkgs/issues/271792
cuda_cudart
libcublas
];
rocmBuildInputs = with rocmPackages; [
clr
hipblas
rocblas
];
vulkanBuildInputs = [
shaderc
vulkan-headers
vulkan-loader
];
hexagonBuildInputs = [
hexagon-sdk
];
in
effectiveStdenv.mkDerivation (finalAttrs: {
pname = "llama-cpp";
version = "8871";
src = fetchFromGitHub {
owner = "ggml-org";
repo = "llama.cpp";
tag = "b${finalAttrs.version}";
hash = "sha256-dSMomkkG3YFwXAcYTym6Z03u8ZAWFFio8jdQJPMJ/yg=";
leaveDotGit = true;
postFetch = ''
git -C "$out" rev-parse --short HEAD > $out/COMMIT
find "$out" -name .git -print0 | xargs -0 rm -rf
'';
};
nativeBuildInputs = [
cmake
pkgs.clang
ninja
pkg-config
blas
]
++ optionals cudaSupport [
cudaPackages.cuda_nvcc
autoAddDriverRunpath
];
buildInputs =
optionals cudaSupport cudaBuildInputs
++ optionals openclSupport [ clblast ]
++ optionals rocmSupport rocmBuildInputs
++ optionals blasSupport [ blas ]
++ optionals vulkanSupport vulkanBuildInputs
++ optionals hexagonSupport hexagonBuildInputs
++ [
curl
];
preConfigure = ''
prependToVar cmakeFlags "-DLLAMA_BUILD_COMMIT:STRING=$(cat COMMIT)"
'';
cmakeFlags = [
# -march=native is non-deterministic; override with platform-specific flags if needed
(cmakeBool "GGML_NATIVE" false)
(cmakeBool "LLAMA_BUILD_EXAMPLES" false)
(cmakeBool "LLAMA_BUILD_SERVER" true)
(cmakeBool "LLAMA_BUILD_TESTS" (finalAttrs.finalPackage.doCheck or false))
(cmakeBool "LLAMA_CURL" true)
(cmakeBool "BUILD_SHARED_LIBS" true)
(cmakeBool "GGML_BLAS" blasSupport)
(cmakeBool "GGML_CLBLAST" openclSupport)
(cmakeBool "GGML_CUDA" cudaSupport)
(cmakeBool "GGML_HIP" rocmSupport)
(cmakeBool "GGML_METAL" metalSupport)
(cmakeBool "GGML_RPC" rpcSupport)
(cmakeBool "GGML_VULKAN" vulkanSupport)
(cmakeBool "GGML_HEXAGON" hexagonSupport)
(cmakeFeature "LLAMA_BUILD_NUMBER" finalAttrs.version)
]
++ optionals cudaSupport [
(cmakeFeature "CMAKE_CUDA_ARCHITECTURES" cudaPackages.flags.cmakeCudaArchitecturesString)
]
++ optionals rocmSupport [
(cmakeFeature "CMAKE_HIP_COMPILER" "${rocmPackages.clr.hipClangPath}/clang++")
(cmakeFeature "CMAKE_HIP_ARCHITECTURES" (builtins.concatStringsSep ";" rocmGpuTargets))
]
++ optionals metalSupport [
(cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1")
(cmakeBool "LLAMA_METAL_EMBED_LIBRARY" true)
]
++ optionals rpcSupport [
# This is done so we can move rpc-server out of bin because llama.cpp doesn't
# install rpc-server in their install target.
(cmakeBool "CMAKE_SKIP_BUILD_RPATH" true)
]
++ optionals hexagonSupport [
# (cmakeFeature "CMAKE_TOOLCHAIN_FILE" "${finalAttrs.src}/cmake/arm64-linux-clang.cmake")
(cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1")
(cmakeFeature "CMAKE_CXX_FLAGS" "")
(cmakeBool "GGML_OPENMP" false)
(cmakeBool "GGML_LLAMAFILE" false)
(cmakeFeature "GGML_OPENCL" "OFF")
(cmakeFeature "PREBUILT_LIB_DIR" "linux_aarch64")
(cmakeFeature "GGML_HEXAGON_FP32_QUANTIZE_GROUP_SIZE" "128")
(cmakeFeature "HEXAGON_SDK_ROOT" "${hexagon-sdk}/opt")
(cmakeFeature "HEXAGON_TOOLS_ROOT" "${hexagon-sdk}/opt/tools/HEXAGON_Tools/19.0.04")
(cmakeFeature "LLAMA_OPENSSL" "OFF")
];
# upstream plans on adding targets at the cmakelevel, remove those
# additional steps after that
postInstall = ''
# Match previous binary name for this package
ln -sf $out/bin/llama-cli $out/bin/llama
mkdir -p $out/include
cp $src/include/llama.h $out/include/
''
+ optionalString rpcSupport "cp bin/rpc-server $out/bin/llama-rpc-server";
# the tests are failing as of 2025-08
doCheck = false;
passthru = {
tests = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
metal = llama-cpp.override { metalSupport = true; };
};
updateScript = nix-update-script {
attrPath = "llama-cpp";
extraArgs = [
"--version-regex"
"b(.*)"
];
};
};
meta = {
description = "Inference of Meta's LLaMA model (and others) in pure C/C++";
homepage = "https://github.com/ggml-org/llama.cpp";
license = lib.licenses.mit;
mainProgram = "llama";
maintainers = with lib.maintainers; [
booxter
dit7ya
philiptaron
xddxdd
];
platforms = lib.platforms.unix;
badPlatforms = optionals (cudaSupport || openclSupport) lib.platforms.darwin;
broken =
(metalSupport && !effectiveStdenv.hostPlatform.isDarwin)
|| (hexagonSupport && !effectiveStdenv.hostPlatform.isAarch64);
};
})
+1 -1
View File
@@ -44,7 +44,7 @@ in
owner = "rust-skia"; owner = "rust-skia";
repo = "skia"; repo = "skia";
# see rust-skia:skia-bindings/Cargo.toml#package.metadata skia # see rust-skia:skia-bindings/Cargo.toml#package.metadata skia
tag = "m148-0.97.0"; tag = "m145-0.92.0";
hash = "sha256-9N780AwheKBJRcZC4l/uWFNq+oOyoNp4M6dJAVVAFeo="; hash = "sha256-9N780AwheKBJRcZC4l/uWFNq+oOyoNp4M6dJAVVAFeo=";
}; };
# The externals for skia are taken from skia/DEPS # The externals for skia are taken from skia/DEPS
+6 -6
View File
@@ -1,8 +1,8 @@
{ {
"expat": { "expat": {
"url": "https://chromium.googlesource.com/external/github.com/libexpat/libexpat.git", "url": "https://chromium.googlesource.com/external/github.com/libexpat/libexpat.git",
"rev": "6154446fccefbf3ca644894f598969113b0c7bcd", "rev": "8e49998f003d693213b538ef765814c7d21abada",
"sha256": "sha256-ifMDdEWu9H8iJ/VSKuXlisJKx1s1F8ecT74bwXnBWcA=" "sha256": "sha256-zP2kiB4nyLi0/I8OsRhxKG0qRGPe2ALLQ+HHfqlBJ6Y="
}, },
"libjpeg-turbo": { "libjpeg-turbo": {
"url": "https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git", "url": "https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git",
@@ -21,8 +21,8 @@
}, },
"harfbuzz": { "harfbuzz": {
"url": "https://chromium.googlesource.com/external/github.com/harfbuzz/harfbuzz.git", "url": "https://chromium.googlesource.com/external/github.com/harfbuzz/harfbuzz.git",
"rev": "9cb1fee51069b206effb4736e443b038d230789d", "rev": "31695252eb6ed25096893aec7f848889dad874bc",
"sha256": "sha256-EYItQuWvB4q2Q2iJfMyEtX9MTm3rEFlcwZ+NQEAVy0M=" "sha256": "sha256-Csyz08JTNXfY2fo27x1Eg1CqO/tt8Rt9udr3KflojSg="
}, },
"wuffs": { "wuffs": {
"url": "https://skia.googlesource.com/external/github.com/google/wuffs-mirror-release-c.git", "url": "https://skia.googlesource.com/external/github.com/google/wuffs-mirror-release-c.git",
@@ -31,7 +31,7 @@
}, },
"libpng": { "libpng": {
"url": "https://skia.googlesource.com/third_party/libpng.git", "url": "https://skia.googlesource.com/third_party/libpng.git",
"rev": "d5515b5b8be3901aac04e5bd8bd5c89f287bcd33", "rev": "4e3f57d50f552841550a36eabbb3fbcecacb7750",
"sha256": "sha256-N507gFyjXXsJ3dyQN0SlVy80WXlbNlZs/cnqLaCmFTk=" "sha256": "sha256-tNRrA9RUp6Mi7dbIB/70a/4tn/JxAsTUb9EI9nlXLjM="
} }
} }