apfel-llm: init at 1.0.5

This package enables to run apples foundation models locally on your
MacOS device!
Since it requires swift 6.3.0 to build and nixpkgs provides only 5.10.1,
I opted to package the release output.
Autoupdates and version check are enabled!
This commit is contained in:
Mirza Arnaut
2026-04-08 23:56:59 +02:00
parent 7b25dc29ae
commit efb2bfafc5

View File

@@ -0,0 +1,53 @@
{
lib,
stdenv,
fetchurl,
versionCheckHook,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "apfel-llm";
version = "1.0.5";
__structuredAttrs = true;
strictDeps = true;
# Building from source requires swift 6.3.0 while nixpkgs only has 5.10.1
src = fetchurl {
url = "https://github.com/Arthur-Ficial/apfel/releases/download/v${finalAttrs.version}/apfel-${finalAttrs.version}-arm64-macos.tar.gz";
hash = "sha256-etEOYkYVPm08SRE3nuKcDigS7lCkUUgMacOl/sLv/1A=";
};
sourceRoot = ".";
dontBuild = true;
dontConfigure = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp apfel $out/bin/
chmod +x $out/bin/apfel
runHook postInstall
'';
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Local Apple Intelligence LLM CLI and server";
homepage = "https://github.com/Arthur-Ficial/apfel";
changelog = "https://github.com/Arthur-Ficial/apfel/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
platforms = [ "aarch64-darwin" ];
mainProgram = "apfel";
sourceProvenance = [
lib.sourceTypes.binaryNativeCode
];
};
})