From 2a0a9dff4087b0512562509ae01b37942fc75b99 Mon Sep 17 00:00:00 2001 From: Brian McGillion Date: Tue, 28 Jul 2026 13:14:30 +0400 Subject: [PATCH] graphify: 0.4.23 -> 0.9.28 The project moved from safishamsi/graphify to Graphify-Labs/graphify; repoint src and homepage at the new location. 0.9.x adds numpy and rapidfuzz as runtime dependencies, and four more tree-sitter grammars (bash, fortran, groovy, json). Four of the grammar bindings need pythonRelaxDeps because python3Packages.tree-sitter-grammars tracks the grammar repositories, whose versions drift from the pins declared upstream. The pdf extra swapped html2text for markdownify; anthropic, bedrock, chinese, openai and postgres extras are new and all resolvable in nixpkgs. falkordb has no nixpkgs package, so that extra is left out. Set dontCheckPythonMetadata: the attribute and the command are `graphify`, but upstream publishes the distribution as `graphifyy`, and pythonMetadataCheckPhase resolves the distribution by `pname`. The plain build does not run that phase, but any consumer does, e.g. nix-build -E 'with import ./. {}; python3.withPackages (_: [ (python3.pkgs.toPythonModule graphify) ])' => PackageNotFoundError: No package metadata was found for graphify Changelog: https://github.com/Graphify-Labs/graphify/blob/v0.9.28/CHANGELOG.md Signed-off-by: Brian McGillion --- pkgs/by-name/gr/graphify/package.nix | 55 +++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/gr/graphify/package.nix b/pkgs/by-name/gr/graphify/package.nix index 8c06ea6fd493..4b6a64684572 100644 --- a/pkgs/by-name/gr/graphify/package.nix +++ b/pkgs/by-name/gr/graphify/package.nix @@ -8,34 +8,49 @@ python3Packages.buildPythonApplication rec { __structuredAttrs = true; pname = "graphify"; - version = "0.4.23"; + version = "0.9.28"; pyproject = true; src = fetchFromGitHub { owner = "Graphify-Labs"; repo = "graphify"; tag = "v${version}"; - hash = "sha256-QEzB1tFBqGhpmI7oudMRC1Ia0CDcm+GYt6AgxMA5zDo="; + hash = "sha256-iu/ARF1ylyrDUWke70kLpji4azfIeBSDSQ6uS+CKYiw="; }; build-system = [ python3.pkgs.setuptools ]; + # The bindings in python3Packages.tree-sitter-grammars track the grammar + # repos, whose versions drift from the pins upstream declares. + pythonRelaxDeps = [ + "tree-sitter-fortran" + "tree-sitter-groovy" + "tree-sitter-julia" + "tree-sitter-kotlin" + ]; + dependencies = with python3.pkgs; [ networkx + numpy + rapidfuzz tree-sitter ] ++ (with python3.pkgs.tree-sitter-grammars; [ + tree-sitter-bash tree-sitter-c tree-sitter-c-sharp tree-sitter-cpp tree-sitter-elixir + tree-sitter-fortran tree-sitter-go + tree-sitter-groovy tree-sitter-java tree-sitter-javascript + tree-sitter-json tree-sitter-julia tree-sitter-kotlin tree-sitter-lua @@ -53,11 +68,21 @@ python3Packages.buildPythonApplication rec { ]); optional-dependencies = with python3.pkgs; { + anthropic = [ + anthropic + ]; + bedrock = [ + boto3 + ]; + chinese = [ + jieba + ]; leiden = [ graspologic ]; mcp = [ mcp + starlette ]; neo4j = [ neo4j @@ -66,10 +91,17 @@ python3Packages.buildPythonApplication rec { openpyxl python-docx ]; + openai = [ + openai + tiktoken + ]; pdf = [ - html2text + markdownify pypdf ]; + postgres = [ + psycopg + ]; svg = [ matplotlib ]; @@ -82,11 +114,24 @@ python3Packages.buildPythonApplication rec { ]; }; + pythonImportsCheck = [ "graphify" ]; + + # The attribute and the command are `graphify`, but upstream publishes the + # distribution as `graphifyy`. pythonMetadataCheckPhase resolves the + # distribution by `pname`, so it cannot find it: + # nix-build -E 'with import ./. {}; + # python3.withPackages (_: [ (python3.pkgs.toPythonModule graphify) ])' + # => PackageNotFoundError: No package metadata was found for graphify + dontCheckPythonMetadata = true; + meta = { description = "AI coding assistant skill. Turn any folder of code, docs, papers, images, or videos into a queryable knowledge graph."; homepage = "https://github.com/Graphify-Labs/graphify"; - changelog = "https://github.com/Graphify-Labs/graphify/blob/${src.rev}/CHANGELOG.md"; - license = lib.licenses.mit; + changelog = "https://github.com/Graphify-Labs/graphify/blob/${src.tag}/CHANGELOG.md"; + license = with lib.licenses; [ + asl20 + mit + ]; maintainers = with lib.maintainers; [ stunkymonkey ]; mainProgram = "graphify"; };