Files
Clément bd142e3987 python3Packages.hg-git: fix build failure
the dulwich version we are using is ahead of the one used upstream by hg-git.
the build was failing because it could not import 'ANNOTATED_TAG_SUFFIX' from
'dulwich.refs'.

- dulwich renamed `ANNOTATED_TAG_SUFFIX` to `PEELED_TAG_SUFFIX` in [2ef900fa](https://github.com/jelmer/dulwich/commit/2ef900fa)
- dulwich moved `PEELED_TAG_SUFFIX` to `dulwich.protocol` in [abdb24e2](https://github.com/jelmer/dulwich/commit/abdb24e2)
2026-03-20 09:23:25 -07:00

48 lines
975 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
setuptools-scm,
dulwich,
mercurial,
}:
buildPythonPackage rec {
pname = "hg-git";
version = "1.2.0";
pyproject = true;
src = fetchPypi {
pname = "hg_git";
inherit version;
hash = "sha256-Pr+rNkqBubVlsQCyqd5mdr8D357FzSd3Kuz5EWeez8M=";
};
build-system = [
setuptools
setuptools-scm
];
dependencies = [
dulwich
mercurial
];
# the dulwich version we are using is ahead of the one used upstream by hg-git.
# the build was failing because it could not import 'ANNOTATED_TAG_SUFFIX' from
# 'dulwich.refs'.
patches = [ ./dulwich_ANNOTATED_TAG_SUFFIX_renamed.patch ];
pythonRelaxDeps = [ "dulwich" ];
pythonImportsCheck = [ "hggit" ];
meta = {
description = "Push and pull from a Git server using Mercurial";
homepage = "https://hg-git.github.io/";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ koral ];
};
}