Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 57 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
description = "oMLX - LLM inference server optimized for Apple Silicon";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};

outputs = { self, nixpkgs }:
let
system = "aarch64-darwin";
pkgs = import nixpkgs { inherit system; };
python = pkgs.python312;
version = pkgs.lib.removeSuffix "\""
(pkgs.lib.removePrefix "__version__ = \""
(pkgs.lib.trim (builtins.readFile ./omlx/_version.py)));
in
{
packages.${system}.default = python.pkgs.buildPythonApplication {
pname = "omlx";
inherit version;
pyproject = true;
src = self;
build-system = with python.pkgs; [
setuptools
wheel
];

dependencies = with python.pkgs; [
fastapi
itsdangerous
jsonschema
mlx
mlx-lm
pillow
requests
uvicorn
];
dontCheckRuntimeDeps = true;

meta = {
description = "LLM inference server optimized for Apple Silicon";
homepage = "https://github.com/jundot/omlx";
license = pkgs.lib.licenses.asl20;
maintainers = with pkgs.lib.maintainers; [ dzmitry-lahoda ];
platforms = [ system ];
mainProgram = "omlx";
};
};

devShells.${system}.default = pkgs.mkShell {
packages = [
python
pkgs.uv
];
};
};
}