1{ lib
2, buildPythonPackage
3, fetchPypi
4, dulwich
5, isPy3k
6, fetchpatch
7}:
8
9buildPythonPackage rec {
10 pname = "hg-git";
11 version = "0.8.12";
12 disabled = isPy3k;
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "13hbm0ki6s88r6p65ibvrbxnskinzdz0m9gsshb8s571p91ymfjn";
17 };
18
19 propagatedBuildInputs = [ dulwich ];
20
21 # Needs patch to work with Mercurial 4.8
22 # https://foss.heptapod.net/mercurial/hg-git/-/issues/264
23 patches = [
24 (fetchpatch {
25 url = "https://foss.heptapod.net/mercurial/hg-git/-/commit/186b37af1ff61e8141e9eea5c75a03b3c82f1ab9.diff";
26 sha256 = "sha256-KS6fUJOVzCYX/r5sdRXuFDKtlgxz80bGDFb71ISnRgc=";
27 })
28 ];
29
30 meta = with lib; {
31 description = "Push and pull from a Git server using Mercurial";
32 homepage = "https://hg-git.github.io/";
33 maintainers = with maintainers; [ koral ];
34 license = licenses.gpl2Only;
35 };
36}