ggml: init at 0.9.5

This commit is contained in:
Gaetan Lepage
2026-01-14 15:21:05 +00:00
parent c6b957f00e
commit 3d694b826b
+45
View File
@@ -0,0 +1,45 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ggml";
version = "0.9.5";
src = fetchFromGitHub {
owner = "ggml-org";
repo = "ggml";
tag = "v${finalAttrs.version}";
hash = "sha256-lNrON8vKUJU7cxfpRKsVCIWqZj3xtkaf/Fv8zNZFN6o=";
};
# The cmake package does not handle absolute CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_INCLUDEDIR
# correctly.
# Tracking: https://github.com/NixOS/nixpkgs/issues/144170
postPatch = ''
substituteInPlace ggml.pc.in \
--replace-fail \
"\''${prefix}/@CMAKE_INSTALL_INCLUDEDIR@" \
"@CMAKE_INSTALL_FULL_INCLUDEDIR@" \
--replace-fail \
"\''${prefix}/@CMAKE_INSTALL_LIBDIR@" \
"@CMAKE_INSTALL_FULL_LIBDIR@"
'';
strictDeps = true;
nativeBuildInputs = [
cmake
];
meta = {
description = "Tensor library for machine learning";
homepage = "https://github.com/ggml-org/ggml";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ GaetanLepage ];
platforms = lib.platforms.all;
};
})