Files
nixpkgs/pkgs/by-name/gr/graphify/package.nix
Brian McGillion 2a0a9dff40 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 <bmg.avoin@gmail.com>
2026-08-04 08:00:51 +04:00

139 lines
2.9 KiB
Nix

{
lib,
python3Packages,
fetchFromGitHub,
python3,
}:
python3Packages.buildPythonApplication rec {
__structuredAttrs = true;
pname = "graphify";
version = "0.9.28";
pyproject = true;
src = fetchFromGitHub {
owner = "Graphify-Labs";
repo = "graphify";
tag = "v${version}";
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
tree-sitter-objc
tree-sitter-php
tree-sitter-powershell
tree-sitter-python
tree-sitter-ruby
tree-sitter-rust
tree-sitter-scala
tree-sitter-swift
tree-sitter-typescript
tree-sitter-verilog
tree-sitter-zig
]);
optional-dependencies = with python3.pkgs; {
anthropic = [
anthropic
];
bedrock = [
boto3
];
chinese = [
jieba
];
leiden = [
graspologic
];
mcp = [
mcp
starlette
];
neo4j = [
neo4j
];
office = [
openpyxl
python-docx
];
openai = [
openai
tiktoken
];
pdf = [
markdownify
pypdf
];
postgres = [
psycopg
];
svg = [
matplotlib
];
video = [
faster-whisper
yt-dlp
];
watch = [
watchdog
];
};
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.tag}/CHANGELOG.md";
license = with lib.licenses; [
asl20
mit
];
maintainers = with lib.maintainers; [ stunkymonkey ];
mainProgram = "graphify";
};
}