Loading pkgs/by-name/gg/ggml/package.nix 0 → 100644 +45 −0 Original line number Diff line number Diff line { 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; }; }) pkgs/development/python-modules/ggml-python/default.nix 0 → 100644 +102 −0 Original line number Diff line number Diff line { lib, stdenv, buildPythonPackage, fetchFromGitHub, replaceVars, # build-system cmake, ninja, scikit-build-core, # buildInputs ggml, # dependencies numpy, typing-extensions, # optional-dependencies accelerate, sentencepiece, torch, torchaudio, torchvision, transformers, cairosvg, mkdocs, mkdocs-material, mkdocstrings, pillow, # tests pytestCheckHook, }: buildPythonPackage (finalAttrs: { pname = "ggml-python"; version = "0.0.37"; pyproject = true; src = fetchFromGitHub { owner = "abetlen"; repo = "ggml-python"; tag = "v${finalAttrs.version}"; # ggml-python expects an older version of ggml than pkgs.ggml's fetchSubmodules = true; hash = "sha256-QFpUGQ8m4c0SpHWnHhoyPdQkcywBToeLahDtG+JMcmA="; }; build-system = [ cmake ninja scikit-build-core ]; dontUseCmakeConfigure = true; buildInputs = [ ggml ]; dependencies = [ numpy typing-extensions ]; optional-dependencies = { convert = [ accelerate numpy sentencepiece torch torchaudio torchvision transformers ]; docs = [ cairosvg mkdocs mkdocs-material mkdocstrings pillow ]; }; pythonImportsCheck = [ "ggml" ]; preCheck = '' rm -rf ggml ''; nativeCheckInputs = [ pytestCheckHook ]; meta = { description = "Python bindings for ggml"; homepage = "https://github.com/abetlen/ggml-python"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ GaetanLepage ]; }; }) pkgs/top-level/python-packages.nix +2 −0 Original line number Diff line number Diff line Loading @@ -6113,6 +6113,8 @@ self: super: with self; { gftools = callPackage ../development/python-modules/gftools { }; ggml-python = callPackage ../development/python-modules/ggml-python { }; gguf = callPackage ../development/python-modules/gguf { }; ghapi = callPackage ../development/python-modules/ghapi { }; Loading Loading
pkgs/by-name/gg/ggml/package.nix 0 → 100644 +45 −0 Original line number Diff line number Diff line { 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; }; })
pkgs/development/python-modules/ggml-python/default.nix 0 → 100644 +102 −0 Original line number Diff line number Diff line { lib, stdenv, buildPythonPackage, fetchFromGitHub, replaceVars, # build-system cmake, ninja, scikit-build-core, # buildInputs ggml, # dependencies numpy, typing-extensions, # optional-dependencies accelerate, sentencepiece, torch, torchaudio, torchvision, transformers, cairosvg, mkdocs, mkdocs-material, mkdocstrings, pillow, # tests pytestCheckHook, }: buildPythonPackage (finalAttrs: { pname = "ggml-python"; version = "0.0.37"; pyproject = true; src = fetchFromGitHub { owner = "abetlen"; repo = "ggml-python"; tag = "v${finalAttrs.version}"; # ggml-python expects an older version of ggml than pkgs.ggml's fetchSubmodules = true; hash = "sha256-QFpUGQ8m4c0SpHWnHhoyPdQkcywBToeLahDtG+JMcmA="; }; build-system = [ cmake ninja scikit-build-core ]; dontUseCmakeConfigure = true; buildInputs = [ ggml ]; dependencies = [ numpy typing-extensions ]; optional-dependencies = { convert = [ accelerate numpy sentencepiece torch torchaudio torchvision transformers ]; docs = [ cairosvg mkdocs mkdocs-material mkdocstrings pillow ]; }; pythonImportsCheck = [ "ggml" ]; preCheck = '' rm -rf ggml ''; nativeCheckInputs = [ pytestCheckHook ]; meta = { description = "Python bindings for ggml"; homepage = "https://github.com/abetlen/ggml-python"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ GaetanLepage ]; }; })
pkgs/top-level/python-packages.nix +2 −0 Original line number Diff line number Diff line Loading @@ -6113,6 +6113,8 @@ self: super: with self; { gftools = callPackage ../development/python-modules/gftools { }; ggml-python = callPackage ../development/python-modules/ggml-python { }; gguf = callPackage ../development/python-modules/gguf { }; ghapi = callPackage ../development/python-modules/ghapi { }; Loading