diff --git a/pkgs/by-name/ga/gaphor/fix-dulwich-api.patch b/pkgs/by-name/ga/gaphor/fix-dulwich-api.patch new file mode 100644 index 000000000000..8af56ca1aa8e --- /dev/null +++ b/pkgs/by-name/ga/gaphor/fix-dulwich-api.patch @@ -0,0 +1,29 @@ +From 7f4f7fcd97acef841e046191d98c900b61b78c17 Mon Sep 17 00:00:00 2001 +From: Dan Yeaw +Date: Sat, 4 Apr 2026 15:46:25 -0400 +Subject: [PATCH] Fix dulwich porcelain API + +--- + gaphor/storage/tests/fixtures.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/gaphor/storage/tests/fixtures.py b/gaphor/storage/tests/fixtures.py +index d071e4556f..4dd0c60bf1 100644 +--- a/gaphor/storage/tests/fixtures.py ++++ b/gaphor/storage/tests/fixtures.py +@@ -16,11 +16,13 @@ def commit_all(message): + main_ref = commit_all("Initial commit") + + porcelain.branch_create(repo, "branch") +- porcelain.checkout_branch(repo, "branch") ++ porcelain.switch(repo, "branch") + filename.write_text(their_text, encoding="utf-8") + branch_oid = commit_all("Branch commit") + +- porcelain.checkout_branch(repo, main_ref) ++ # OID + detach=True: works when default branch is not "main" (e.g. older ++ # Dulwich uses "master"); "git merge" still runs on HEAD. ++ porcelain.switch(repo, main_ref, detach=True) + filename.write_text(our_text, encoding="utf-8") + commit_all("Second commit") + diff --git a/pkgs/by-name/ga/gaphor/package.nix b/pkgs/by-name/ga/gaphor/package.nix index a414571cfcad..6922fc74d7b8 100644 --- a/pkgs/by-name/ga/gaphor/package.nix +++ b/pkgs/by-name/ga/gaphor/package.nix @@ -23,6 +23,12 @@ python3Packages.buildPythonApplication (finalAttrs: { hash = "sha256-0Z0RFQrN2g0beV2konZBfMroeNtbT+sPRsWlRvQFYBk="; }; + patches = [ + # from https://github.com/gaphor/gaphor/pull/4236 + # please remove after next update + ./fix-dulwich-api.patch + ]; + pythonRelaxDeps = [ "pydot" "pygobject"